-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
Works fine on a simple path like /a β JSON spec loads, endpoints and schemas show up.
But when I try a nested path like /a/b, the docs page loads, but the spec fails to load. Console shows it trying /a/a/b/json instead of /a/b/json, so nothing shows in the UI.
Looks like the plugin is calculating the spec URL wrong for nested routes.
src/index.ts
import { Elysia, t } from 'elysia'
import { openapi } from '@elysiajs/openapi'
new Elysia()
.use(openapi({
path: '/a/b'
}))
.get('/', () => 'hi', { response: t.String({ description: 'sample description' }) })
.listen(8080);version
"dependencies": {
"@elysiajs/openapi": "~1.4.11",
"elysia": "~1.4.16"
}console
standalone.js:34920 @scalar/[email protected] standalone.js:34618 [CLIENT]: Client element changed. Unmounting client...
standalone.js:34618 [CLIENT]: Client element changed. Mounting client...
standalone.js:34771 GET http://localhost:8080/a/a/b/json 404 (Not Found)
vimutti77
Metadata
Metadata
Assignees
Labels
No labels