-
Notifications
You must be signed in to change notification settings - Fork 213
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
Added alwaysInheritAuthentication option to v2 #728
Added alwaysInheritAuthentication option to v2 #728
Conversation
lib/schemaUtils.js
Outdated
@@ -2647,7 +2647,12 @@ module.exports = { | |||
} | |||
|
|||
// handling authentication here (for http type only) | |||
authHelper = this.getAuthHelper(openapi, operation.security); | |||
if (options.alwaysInheritAuthentication) { | |||
authHelper = this.getAuthHelper(openapi, openapi.security); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SahilChoudhary22 In case when this is true
, should we simply be using auth as Inherit from parent
rather than defining it the same as parents? i.e. Value of authHelper should be undefined
same as what's done in v2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VShingala Correct! Asked the same doubt from user on the parent PR. Missed it in this PR. Have fixed with the following commit - a942449
Description
alwaysInheritAuthentication
to thev1
version of converter. This one adds the support forv2
on top of it and aims to make the option compatible with the latest code.A big Thanks to @AndrewGuenther for raising the above mentioned PR!