Skip to content

Commit 4c9f204

Browse files
committed
fix: fix path in openapi schema
1 parent 1d78927 commit 4c9f204

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export const swagger = async <Path extends string = '/swagger'>(
134134
schema,
135135
hook: route.hooks,
136136
method,
137-
path: route.path,
137+
path: join(extPrefix, prefixedPath, route.path),
138138
// @ts-ignore
139139
models: app.definitions?.type,
140140
contentType: route.hooks.type
@@ -147,7 +147,7 @@ export const swagger = async <Path extends string = '/swagger'>(
147147
schema,
148148
hook: route.hooks,
149149
method: route.method,
150-
path: route.path,
150+
path: join(extPrefix, prefixedPath, route.path),
151151
// @ts-ignore
152152
models: app.definitions?.type,
153153
contentType: route.hooks.type

0 commit comments

Comments
 (0)