File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export const swagger = async <Path extends string = '/swagger'>(
47
47
excludeMethods : [ 'OPTIONS' ] ,
48
48
excludeTags : [ ]
49
49
}
50
- ) => {
50
+ ) => ( rootApp : Elysia ) => {
51
51
const schema = { }
52
52
let totalRoutes = 0
53
53
@@ -62,7 +62,7 @@ export const swagger = async <Path extends string = '/swagger'>(
62
62
}
63
63
64
64
const app = new Elysia ( { name : '@elysiajs/swagger' } )
65
- const prefixedPath = join ( app . config . prefix ?? "/" , path )
65
+ const prefixedPath = join ( rootApp . config . prefix ?? "/" , path )
66
66
67
67
app . get ( path , function documentation ( request ) {
68
68
// External Prefix, if the app is behind a reverse proxy
@@ -191,4 +191,4 @@ export const swagger = async <Path extends string = '/swagger'>(
191
191
}
192
192
193
193
export type { ElysiaSwaggerConfig }
194
- export default swagger
194
+ export default swagger
You can’t perform that action at this time.
0 commit comments