feat: add hideOpenApiRoute option to hide detail in openapi generation#59
feat: add hideOpenApiRoute option to hide detail in openapi generation#59Vexcited wants to merge 2 commits intoelysiajs:mainfrom
hideOpenApiRoute option to hide detail in openapi generation#59Conversation
WalkthroughThe PR introduces a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code graph analysis (1)test/index.test.ts (1)
🔇 Additional comments (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
I use Elysia as a full stack framework that uses
elysia-staticto deploy my built Vite app.Unfortunately, this plugin does not hide by default the routes so in my generated OpenAPI, I can see the static routes too!
Example on a demo application with my
prefixset to/.GET /*and that emptyGETone should NOT be displayed.To resolve this issue, I propose an option to hide details for OpenAPI (
detail: { hide: true }) by adding thehideOpenApiRouteproperty (trueby default) to the configuration of the plugin.If I apply this PR to the previous demo application, I now get the following, which is way clearer.
Summary by CodeRabbit
New Features
hideOpenApiRouteconfiguration option to the Static Plugin (enabled by default) that controls OpenAPI and Swagger route visibility.Tests
✏️ Tip: You can customize this high-level summary in your review settings.