refactor(types): improved security scheme#1915
Conversation
type in options of add security| .addApiKey({ type: 'apiKey' }, 'key1') | ||
| .addApiKey({ type: 'apiKey' }, 'key2') |
There was a problem hiding this comment.
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?
| options: Partial<Omit<HttpSchemeObject, 'type'>> = {}, | ||
| name = 'basic' |
There was a problem hiding this comment.
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.
@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