-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
components.securitySchemes is missing from the generated openapi.json #160
Comments
@amritk I had the same problem, but based on this #8 new Elysia().use(
swagger({
documentation: {
components: {
securitySchemes: {
BearerAuth: {
type: 'http',
scheme: 'bearer',
bearerFormat: 'JWT',
},
},
},
},
scalarConfig: {
authentication: {
preferredSecurityScheme: 'BearerAuth',
},
},
}),
).get(
'/endpoint',
() => 'endpoint',
{ detail: { security: [{ BearerAuth: [] }] }
); this should be detailed in the documentation, took me a while to find out the proper configuration |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As seen in this ticket, when you specify security on an endpoint, how can you get the securityScheme added to the components.securitySchemes in the openapi.json?
The text was updated successfully, but these errors were encountered: