Closed
Description
When setting a prefix in Elysia and simultaneously using Swagger, it fails to correctly load /swagger/json
.
To reproduce:
new Elysia({ prefix: '/v1' })
.use(swagger())
.use(logixlysia()) // logger used to highlight responses on console
.get('/', () => 'Hello!')
.listen(3000);
Visit the server in a browser http://localhost:3000/v1/swagger
and you'll be presented with the UI theme of Scalar, but no content.
Adding a logger reveals that /v1/swagger
gets hit and returns a 200 status, immediately followed by /swagger/json
(note the lack of prefix) getting hit with a 404 status.
It seems this has been attempted to be fixed before #16 but has remained an ongoing issue since at least October 2024.


Metadata
Metadata
Assignees
Labels
No labels