-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Description
When using Elysia like this:
import { Elysia } from "elysia";
import { swagger } from "@elysiajs/swagger";
const app = new Elysia({ prefix: "/api" }).use(
swagger({
path: "/swagger",
})
);
app.get("/", (ctx) => ctx.headers);
app.listen({ port: 3003, hostname: "0.0.0.0" });
console.log(
`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
);
One would expect that swagger would be exposed at /api/swagger
. Which it is, but opening the page you get the following error:
The JSON is resolvable at /api/swagger/json
, under the /api
prefix as expected, but the swagger try to fetch it from /swagger/json
.
Metadata
Metadata
Assignees
Labels
No labels