docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
Use tag description as sidebar item description
Is your feature request related to a problem?
When grouping by tag, operations are categorized using the tags as categories. On the overview page, each category shows the number of items (i.e. number of operations) in that category.
However, each tag has a description. It might be easier for users to understand the difference between the categories when the tag description is displayed for each category.
For example, https://docusaurus-openapi.tryingpan.dev/category/petstore-api shows the tags as categories of the API, and displays the number of items instead of a description.
Personally, I would like to use it here.
Describe the solution you'd like
With Docusaurus 2.4, a new sidebar item property description is introduced, showing the description instead of the number of items in that category.
We can take the openapi's tag description and directly use it in the sidebar as description.
Describe alternatives you've considered
Nothing 🤷 But thanks for all your efforts on this awesome project ❤️
Additional context
See latest release blog post: 2.4
:tada: Thanks for opening your first issue here! Welcome to the community!
Hi @korthout, I was curious if you've been able to test our v2.0.0-beta.2 release with Docusaurus v2.4.0?
Hi @sserrata 👋
I did already give that a shot, but I'm running into the following error when trying that. I'm unsure whether that originates from docusaurus-openapi-docs though.

Thanks, I haven't had a chance to test for myself. Will need to see what changed between 2.3 and 2.4.
To be clear, you got the error above testing with v2.0.0-beta.2 and Docusaurus 2.4?
To be clear, you got the error above testing with v2.0.0-beta.2 and Docusaurus 2.4?
Good that you verified this, I was locally still using v2.0.0-beta.1 😅 But after upgrading locally, I still ran into that error.
That is with these dependencies:
"dependencies": {
"@docusaurus/core": "^2.4.0",
"@docusaurus/preset-classic": "^2.4.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"docusaurus-plugin-openapi-docs": "^2.0.0-beta.2",
"docusaurus-theme-openapi-docs": "^2.0.0-beta.2",
"prism-react-renderer": "^1.3.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
Running:
yarn install
yarn run clean-api-docs all
yarn run gen-api-docs all
yarn start
Issue addressed