mirror of
https://github.com/zoriya/elysia-swagger.git
synced 2025-12-06 00:36:10 +00:00
Update src/index.ts
Co-authored-by: Jozef Mikuláš <jmikulas.sk@gmail.com>
This commit is contained in:
@@ -85,7 +85,7 @@ export const swagger = async <Path extends string = '/swagger'>(
|
||||
const scalarConfiguration: ReferenceConfiguration = {
|
||||
spec: {
|
||||
...scalarConfig.spec,
|
||||
url: `${request.url}/json`
|
||||
url: `${new URL(request.url).pathname.replace(/\/$/, "")}/json`
|
||||
},
|
||||
...scalarConfig,
|
||||
// so we can showcase the elysia theme
|
||||
|
||||
Reference in New Issue
Block a user