We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2b62fa commit 4d48235Copy full SHA for 4d48235
src/index.ts
@@ -66,7 +66,7 @@ export const swagger = async <Path extends string = '/swagger'>(
66
67
const app = new Elysia({ name: '@elysiajs/swagger' })
68
69
- app.get(path, function documentation() {
+ app.get(path, function documentation({request}) {
70
const combinedSwaggerOptions = {
71
url: openAPISpecUrl,
72
dom_id: '#swagger-ui',
@@ -85,7 +85,7 @@ export const swagger = async <Path extends string = '/swagger'>(
85
const scalarConfiguration: ReferenceConfiguration = {
86
spec: {
87
...scalarConfig.spec,
88
- url: openAPISpecUrl
+ url: `${request.url}/json`
89
},
90
...scalarConfig,
91
// so we can showcase the elysia theme
0 commit comments