You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, specifying a security schema happens on a per-route basis with the @security annotation. Swagger allows specifying one security schema globally for all routes, e.g. https://swagger.io/docs/specification/authentication/bearer-authentication/
Describe the solution you'd like
Allow specifying a global list of security schemas in the configuration object, or marking security schemas defined in security as global, e.g.
It looks like actually by default, Swagger will apply security schemes defined in the security block to all routes globally, unless overridden on a per-route basis. express-jsdoc-swagger correctly declares the security scheme in the security block but then overrides the security scheme by passing "security": [] on each route without an @security annotation, overriding the default top-level security.
🤔 I see your point. Right now, it is only configurable per route. Adding a global one might be a good idea but not all the API uses global, so we should keep both options. We will think about it.
We want to add a better security definition for Oauth2 so we will consider this in that development.
Is your feature request related to a problem? Please describe.
Currently, specifying a security schema happens on a per-route basis with the
@security
annotation. Swagger allows specifying one security schema globally for all routes, e.g. https://swagger.io/docs/specification/authentication/bearer-authentication/Describe the solution you'd like
Allow specifying a global list of security schemas in the configuration object, or marking security schemas defined in
security
as global, e.g.The text was updated successfully, but these errors were encountered: