cloud-annotations / docusaurus-openapi

šŸ¦• OpenAPI plugin for generating API reference docs in Docusaurus v2.
https://docusaurus-openapi.netlify.app
MIT License
495 stars 82 forks source link

Allow expandable row on Status Code table #10

Open LeoMouyna opened 3 years ago

LeoMouyna commented 3 years ago

For now the only way to know how returned data looks like consist in waiting for a query.

Could it be possible to add an expand button at the end of a status row that would show a response example ? We can already see what a request body looks like in docusaurus-plugin-openapi/src/theme/ApiDemoPanel/Body/index.js, is it possible to also display how response body looks like on docusaurus-plugin-openapi/src/theme/ApiStatusCodesTable/index.js?

If you need more details feel free to ask.

bourdakos1 commented 3 years ago

Yea I think that makes sense, Iā€™d be happy to merge a PR if you can get something working

LeoMouyna commented 3 years ago

I'll give a try but I might need help on css part for a wonderful display šŸ˜„

avaidyam commented 3 years ago

Here's an example of what I think would be helpful as part of the status code/response body table (using RapiDoc).

Screen Shot 2021-03-17 at 11 56 58 AM Screen Shot 2021-03-17 at 11 56 38 AM
joanjane commented 2 years ago

I was looking for the same. A json response example on each status code would be a great feature.

Do you have any plans adding this :) ?