plugins/swagger #511
Replies: 4 comments
-
facing |
Beta Was this translation helpful? Give feedback.
-
When i use with prefix, like: const app = new Elysia({ prefix: "/api" }) the documentations show nothing. Why? |
Beta Was this translation helpful? Give feedback.
-
the components.schemas is empty in the download swagger JSON |
Beta Was this translation helpful? Give feedback.
-
For folks passing by here, if you change the path where you want your docs served, you also need to tell scalar (or swagger) the path to the openapi spec. By default this is served at const app = new Elysia()
.use(
swagger({
documentation: {
tags: [{ name: "Project", description: "Manage projects" }],
},
path: "/api/my-app/swagger",
// vvvvvvvvvvvv
scalarConfig: {
spec: {
url: "/api/my-app/swagger/json",
},
},
}),
) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
plugins/swagger
Plugin for Elysia that adds support for generating Swagger API documentation for Elysia Server. Start by installing the plugin with "bun add @elysiajs/swagger".
https://elysiajs.com/plugins/swagger
Beta Was this translation helpful? Give feedback.
All reactions