mirror of
https://github.com/zoriya/elysia-swagger.git
synced 2025-12-06 00:36:10 +00:00
Merge branch 'main' of https://github.com/elysiajs/elysia-swagger
This commit is contained in:
@@ -46,11 +46,11 @@ export const swagger =
|
||||
...documentation.info
|
||||
}
|
||||
|
||||
const pathWithPrefix = `${app.config.prefix}${path}`
|
||||
const relativePath = path.startsWith('/') ? path.slice(1) : path
|
||||
|
||||
app.get(path, () => {
|
||||
const combinedSwaggerOptions = {
|
||||
url: `${pathWithPrefix}/json`,
|
||||
url: `${relativePath}/json`,
|
||||
dom_id: '#swagger-ui',
|
||||
...swaggerOptions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user