When a response is defined as follows:
'400':
description: The server could not understand the request due to invalid syntax.
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/InvalidDocument'
- $ref: '#/components/schemas/GenericError'
The code generated by oapi-codegen v2.3.0 does not seem to allow for setting the expected values within the object response.
Generate code:
go run github.com/oapi-codegen/oapi-codegen/v2/cmd/[email protected] -config=config.yml openapi.yaml