-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Function options are not used in the config
import { Elysia, t } from 'elysia'
import z from 'zod'
import { JSONSchema, Schema } from 'effect'
import { openapi, withHeaders } from '../src/index'
const app = new Elysia()
.use(
openapi({
mapJsonSchema: {
zod: z.toJSONSchema
},
scalar: {
onBeforeRequest: ({ request }) => {
console.info('onBeforeRequest', request.method, request.url)
}
}
})
)
.get('/test', ({ status }) => status(204, undefined), {
response: {
204: z.void()
}
})
.listen(3000)
- Run the provided code
- Open http://localhost:3000/openapi
- Open the console and perform a request
You can see that onBeforeRequest
log is not present.
Type errors
Additionally, when setting scalar
options a type error occurs.
It looks like that nearly all scalar
properties are required:

Metadata
Metadata
Assignees
Labels
No labels