-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Possible to use $ref in security and securityDefinitions? #846
Comments
This is especially applicable when the scopes are the same in many path+operation permutations. Just in case anyone stumbles into this, a workaround can be found here. |
If it helps anyone, we got the following to work in a file that references shared security settings:
and then defining
right before |
Closing this for the same reason as #680: This is about a structure in 2.0 that is no longer relevant. Security Schemes have been in the Components Object since 3.0, and see
for more recent similar requests. Closing. |
For large API structures, it makes sense to have API and definitions split out into multiple files for reuse and readability. Both security and securityDefinitions seem like properties that would benefit from leveraging the use of $ref. This way security info can be shared across multiple swagger files for one application.
Is it currently possible and are there examples of how to do it? I've tried multiple ways of defining the structure and nothing seems to work/get validated.
The text was updated successfully, but these errors were encountered: