Closed nomahideki closed 1 year ago
Yes I think you're right on this. Not sure how this got through for so long.
P.s. I cleaned up the format of this issue. You can use back ticks ``` followed by the language as closing and opening tags to format code in github issues. It makes it cleaner and easier for folks to read. No big deal, just letting you know.
Thanks for rewriting things! I'll do it better next time.
Thanks for the contribution. I will release this before end of the week.
In case you specify OpenApiResponse annotation with with schemaType: 'array' and ref setting like this
swagger.json will be created in malformed pattern for response schema. Causing "(no example available)" on Swagger UI example column.
Wrong one
Corrected swagger.json
To Reproduce
Define schema in swagger.yml
Schema Data/DataDetail is derived from other source.
Define response schema using OpenApiResponse annotation
#[OpenApiResponse(schemaType: 'array', ref: '#/components/schemas/SomeData')]
bin/cake swagger bake
Expected behavior
Response schema in swagger.json will have
Version and Platform (please complete the following information):
Additional context I'll try to fix it myself.