tech-docs-gem
tech-docs-gem copied to clipboard
API documentation issues
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
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
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):
And this is how it should get displayed (i.e. an array with one string):