cloud-annotations / docusaurus-openapi

🦕 OpenAPI plugin for generating API reference docs in Docusaurus v2.
https://docusaurus-openapi.netlify.app
MIT License
493 stars 82 forks source link

Render OAS schemas #16

Open avaidyam opened 3 years ago

avaidyam commented 3 years ago

Right now, in addition to the OAS info not being rendered as an initial page (see #8), the OAS schemas section is not rendered ass well. It would probably be a single sidebar category called "Schemas" with each model underneath it (and the demo panel would be disabled for these pages). Here is an example.

bourdakos1 commented 2 years ago

In the link provided, the schema seems to be part of the normal operation page as part of the request body table. I believe this is the default behavior for docusaurus-plugin-openapi?

Am I missing something?

avaidyam commented 2 years ago

This feature request is actually to allow non-operations to appear in the sidebar. Specifically, a new section (like Introduction, but at the bottom) called Schemas whose sub-items are ALL the schemas ONLY, whether used in any operation or not. These schema pages wouldn't have an execute panel since they just display data type + example object info.

bourdakos1 commented 2 years ago

Oh okay, is this like the "Models" section of Swagger UI: https://petstore.swagger.io?

Couple UX questions:

avaidyam commented 2 years ago

Yep! That's the same idea. I think it should only render components.schemas and it would be a Schemas category with one page per schema.

tikre2910 commented 8 months ago

Hi! I have the same issue that components.schemas is not rendered in docusaurus (I am also using redocusaurus in addition) and I am just wondering if there is any progress? Thanks in advance for any replies :)

bourdakos1 commented 8 months ago

No progress has been made, but happy to accept a pull request :)