enzonotario / vitepress-openapi

Generate VitePress API Docs from OpenAPI specifications
https://vitepress-openapi.vercel.app
MIT License
54 stars 9 forks source link

Any way to remove default or change the name and add description #109

Closed wighawag closed 3 weeks ago

wighawag commented 3 weeks ago

What would you like?

Right now It generate such page Screenshot from 2024-11-02 07-52-31

would like to remove Default on the side and move the table of content to the left

Or alternatively, if I could change the name and add a description so the left do not feel emptu

Why is this needed?

No response

How could it be implemented?

No response

Other information

No response

enzonotario commented 3 weeks ago

Hi @wighawag , there are a few options here:

  1. Without updating your openapi.json: You can change the default tag name by setting the defaultTag config. I've also added an option to specify the defaultTagDescription in #114 , so now you can have something like this
  2. Updating your openapi.json: You can specify the tags for each operation, and/or define the TagObject in your openapi.json
  3. Hide the section and add a custom component: You could also configure it to hide that section, and maybe add your own component above it by using:
    spec: {
      defaultTag: 'Custom Default Tag',
      defaultTagDescription: 'Custom Default Tag Description',
      showPathsSummary: false, // <-- Add this
      groupByTags: false, // <-- Also maybe this
    },

If you go with option 1. or 2., maybe the design could be improved. Any suggestions are welcome!