-
Couldn't load subscription status.
- Fork 517
refactor(types): improved security scheme #1915
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
Conversation
type in options of add security| .addApiKey({ type: 'apiKey' }, 'key1') | ||
| .addApiKey({ type: 'apiKey' }, 'key2') |
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.
This would make it a breaking change, but would it make more sense to bring the name to be the first parameter instead of the options?
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.
@jmcdo29 , yep, you're right. Fixed
| options: Partial<Omit<HttpSchemeObject, 'type'>> = {}, | ||
| name = 'basic' |
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.
Making the change I mentioned above here so it would be
| options: Partial<Omit<HttpSchemeObject, 'type'>> = {}, | |
| name = 'basic' | |
| name = 'basic', | |
| options: Partial<Omit<HttpSchemeObject, 'type'>> = {} |
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.
@jmcdo29, Yes, this can also be added, but is it better in a minor update?..
|
@jmcdo29 Yes, I agree. But this is likely to be a breaking change |
|
@xTCry I guess we could keep both and mark the old one as deprecated |
|
What's the reason for this change? |
|
I apologize for the long answer.
This is a typing improvement, based on the official Swagger documentation. It is also simplified to access some methods without specifying unnecessary parameters. For example, why write |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information