openapi icon indicating copy to clipboard operation
openapi copied to clipboard

response content schema elements missing on OpenAPI 3.0

Open pohutukawa opened this issue 4 years ago • 6 comments

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 avatar Apr 30 '20 02:04 pohutukawa

@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.

ikalnytskyi avatar Apr 30 '20 21:04 ikalnytskyi

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!

pohutukawa avatar May 03 '20 22:05 pohutukawa

@ikalnytskyi I am also looking forward for that extension. Is there any way to support you with that?

Lyra2108 avatar May 26 '20 14:05 Lyra2108

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.

olivier-tritschler avatar Jun 11 '20 19:06 olivier-tritschler

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?

instantlinux avatar Apr 21 '21 14:04 instantlinux