-
-
Notifications
You must be signed in to change notification settings - Fork 603
Security schemes support #1943
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
Security schemes support #1943
Conversation
|
drwpow
left a comment
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.
Thanks for adding! Aside from a minor question, we’ll need dedicated tests for this! I see that technically one test did update, but that was incidental. We’ll need to explicitly test that different security schemas generate as-expected.
Note that the examples/ do NOT count as dedicated tests. Those are large snapshot tests where we don’t look carefully at the contents; we just a) make sure they generate without errors, and b) don’t generate invalid TS. Beyond that, their contents are largely-ignored.
Requesting changes only so we can add dedicated security schema tests, but again, generally in favor of this merging. Thanks for taking the time to contribute!
| flows: OAuthFlowsObject; | ||
| } | ||
| | { | ||
| /** REQUIRED. Tye type of the security scheme. */ |
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.
Question: why this change here? My understanding was that other properties are required or not based on the type; this changes them so that they’re all potentially nullable, which feels like a regression?
|
First of all, thank you for your time @FreeAoi . |
|
Closing this PR because there hasn’t been any movement for a little while, but again, we’d gladly accept PRs with this exact implementation so long as tests are added! For anyone else following, feel free to open another PR with this approach but with tests added |
+1 |
Changes
_What does this PR change?
This pull request try to closes Add support for security and securitySchemes
How to Review
How can a reviewer review your changes? What should be kept in mind for this review?
Checklist
docs/updated (if necessary)pnpm run update:examplesrun (only applicable for openapi-typescript)