openapi
openapi copied to clipboard
response content schema elements missing on OpenAPI 3.0
I've been using Sphinx OpenAPI previously with OpenAPI 2.0 specs. Now I'm dealing with my first OpenAPI 3.0 spec, and I've noticed that I can't find a "Response JSON Object" section on the different end-points. The schema is defined in the content
element's content type (application/json
) definition. The content is definitely in the spec (YAML file) and ReDoc as well as SwaggerUI show it.
Or am I doing anything wrong? I'm happy to provide further details.
@pohutukawa I believe the answer is that it's simply not implemented for OpenAPI 3.x. :( I initially started this project for OpenAPI 2.x and over the years OpenAPI 3.x support has been contributed by others. Unfortunately, I didn't pay attention much and we ended up having two independent renders for v2 and v3.
However, last year I started some refactoring the end goal of which is to have a single renderer for both versions, as well as be more aligned with OpenAPI specification regarding some edge cases. The refactoring is not yet finished but I hope it's going to be finished in next few weeks.
Thanks @ikalnytskyi, that's pretty much what I would have expected (it to not being done, yet). It's good to see this in the pipeline, as I'd like to use it down the line.
Keep up the good work, and thanks for this really useful tool!
@ikalnytskyi I am also looking forward for that extension. Is there any way to support you with that?
Thanks for posting this. I was scratching my head on this as well. I'm happy to help make it happen or even simply help test out the new version when it comes out.
So...I have an OpenAPI 3.0.1 project. It's a REST API, so by definition all the parameters are submitted and retrieved as JSON content. What I got when I tried this plugin omits more or less all the info in my endpoint definitions; for example:
PUT /config
Put config values
Status Codes
200 OK – successful operation
Given that maintenance of this plugin has apparently stopped last year, is there a workaround or another tool I could turn to?