try to solve swagger issue
This commit is contained in:
parent
eab5cf7e05
commit
994c9fcb02
1 changed files with 2 additions and 25 deletions
27
src/app.ts
27
src/app.ts
|
|
@ -25,20 +25,12 @@ const app = new Elysia()
|
||||||
credentials: true,
|
credentials: true,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.get("/test", () => "Hello World", {
|
.get("/test", () => "Hello World", {})
|
||||||
detail: {
|
|
||||||
tags: ["Default"],
|
|
||||||
responses: {
|
|
||||||
200: {
|
|
||||||
description: "Success response",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.use(api)
|
.use(api)
|
||||||
.use(
|
.use(
|
||||||
swagger({
|
swagger({
|
||||||
path: "/swagger",
|
path: "/swagger",
|
||||||
|
provider: "swagger-ui", // Explicitly use swagger-ui instead of scalar
|
||||||
documentation: {
|
documentation: {
|
||||||
openapi: "3.0.3",
|
openapi: "3.0.3",
|
||||||
info: {
|
info: {
|
||||||
|
|
@ -46,21 +38,6 @@ const app = new Elysia()
|
||||||
version: "1.0.0",
|
version: "1.0.0",
|
||||||
description: "Canvas API Documentation",
|
description: "Canvas API Documentation",
|
||||||
},
|
},
|
||||||
servers: [
|
|
||||||
{
|
|
||||||
url: ENV.SERVER_URL,
|
|
||||||
description: "API server",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
components: {
|
|
||||||
schemas: {},
|
|
||||||
securitySchemes: {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
swaggerOptions: {
|
|
||||||
persistAuthorization: true,
|
|
||||||
displayOperationId: true,
|
|
||||||
filter: true,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue