elysiajs / elysia-swagger

A plugin for Elysia to auto-generate Swagger page
MIT License
90 stars 46 forks source link

How to use Swagger for multiple instances? #138

Open kulterryan opened 3 months ago

kulterryan commented 3 months ago

I want to use swagger for two different paths:

/api/frontend/docs & /api/backend/docs but both of them are showing the same paths, how can I create docs for both frontend and backend at different URLs?

kravetsone commented 3 months ago

Configure swagger prefix

kulterryan commented 3 months ago

I'm doing it like this only.

Screenshot 2024-08-05 at 7 24 55 PM

andrefelipeschulle commented 1 week ago

@kulterryan managed to make it work?

kulterryan commented 1 week ago

@kulterryan managed to make it work?

Nope, using monorepo setup with elysia as packages.

Ref: https://elysiajs.com/patterns/mount.html

andrefelipeschulle commented 1 week ago

@kulterryan I sent a PR #171, with code to support multiple instances with different paths, I left an example code in the PR as well