cloud-annotations / docusaurus-openapi

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

Modify Label in sidebar (autogenerated) #286

Closed Pratosh22 closed 5 months ago

Pratosh22 commented 6 months ago
  1. Is there a way to modify the sidebar labels autogenerated from the OpenAPI? For example in my case the OpenAPI returns with "audit_logs" i want it to be rendered as Audit Logs in the sidebar.
bourdakos1 commented 6 months ago

Can you share the relevant snippet of your OpenAPI spec?

Pratosh22 commented 6 months ago
Screenshot 2024-04-08 at 6 16 45 PM

This is how it is rendered :

Screenshot 2024-04-08 at 6 17 44 PM
bourdakos1 commented 5 months ago

You should be able to add x-displayName: Audit Logs to the audit_logs tag. You can find an example here: https://github.com/cloud-annotations/docusaurus-openapi/blob/0d2e0ec7faeb23cbcc62e1a59c258a2cc780b00f/demo/examples/petstore.yaml#L62

Pratosh22 commented 5 months ago

Thanks,That did it!