enzonotario / vitepress-openapi

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

Shorter badges for HTTP keywords, maybe? #118

Closed stereobooster closed 1 week ago

stereobooster commented 2 weeks ago

What would you like?

Current implementation for badges use full keyword

Screenshot 2024-11-13 at 10 48 57

I thought maybe it would make sense to shorten them, so all would be the same length

Screenshot 2024-11-13 at 10 49 46

Why is this needed?

For esthetic purposes. Just an idea though

How could it be implemented?

Use shorter keywords. Maybe it can be configurable

Other information

No response

stereobooster commented 2 weeks ago

One more option. Use display: block instead of display: flex

Screenshot 2024-11-13 at 10 54 35
enzonotario commented 1 week ago

Hi @stereobooster , I like the idea to make it configurable, because it even allows to use it as a i18n config for other languages. So now in v0.0.3-alpha.48 you can configure methodAliases to achieve this. For example: https://stackblitz.com/edit/enzonotario-vitepress-openapi-starter-fg9jcm?file=docs%2F.vitepress%2Fconfig.ts

image

Regarding to flex/block style, I don't really see a difference by using block, so for now I prefer to keep using flex, considering that it can still be customized by custom styles.

Thanks for the suggestions! Any feedback from the release is welcome!