tech-docs-gem icon indicating copy to clipboard operation
tech-docs-gem copied to clipboard

API documentation issues

Open marcus-bcl opened this issue 2 years ago • 2 comments

What should change

After following the guide to generate API documentation from an OpenAPI spec, we've found that Array/List responses are rendered incorrectly - they appear as empty objects.

For example, see: https://ministryofjustice.github.io/hmpps-probation-integration-services/tech-docs/projects/create-and-vary-a-licence-and-delius/api-reference.html#probation-case-crn-addresses image

The response should appear as a a list of objects as they do in Swagger, for example: https://create-and-vary-a-licence-and-delius-dev.hmpps.service.justice.gov.uk/swagger-ui/index.html#/probation-case-resource/findAddresses image

marcus-bcl avatar Oct 03 '23 11:10 marcus-bcl

I've had a similar problem with list of strings getting displayed as a list with one empty object.

This is how the response is getting displayed (i.e. an array with one empty object): Screenshot 2024-03-27 at 10 27 38

And this is how it should get displayed (i.e. an array with one string): Screenshot 2024-03-27 at 10 27 55

anahickmann avatar Mar 27 '24 10:03 anahickmann