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'>(
4747 excludeMethods : [ 'OPTIONS' ] ,
4848 excludeTags : [ ]
4949 }
50- ) => {
50+ ) => ( rootApp : Elysia ) => {
5151 const schema = { }
5252 let totalRoutes = 0
5353
@@ -62,7 +62,7 @@ export const swagger = async <Path extends string = '/swagger'>(
6262 }
6363
6464 const app = new Elysia ( { name : '@elysiajs/swagger' } )
65- const prefixedPath = join ( app . config . prefix ?? "/" , path )
65+ const prefixedPath = join ( rootApp . config . prefix ?? "/" , path )
6666
6767 app . get ( path , function documentation ( request ) {
6868 // External Prefix, if the app is behind a reverse proxy
@@ -191,4 +191,4 @@ export const swagger = async <Path extends string = '/swagger'>(
191191}
192192
193193export type { ElysiaSwaggerConfig }
194- export default swagger
194+ export default swagger
You can’t perform that action at this time.
0 commit comments