Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Security schemes support #1943

wants to merge 2 commits into from

Conversation

FreeAoi
Copy link
Contributor

@FreeAoi FreeAoi commented Oct 10, 2024

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

  • Unit tests updated
  • docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript)

@FreeAoi FreeAoi requested a review from a team as a code owner October 10, 2024 05:33
Copy link

changeset-bot bot commented Oct 10, 2024

⚠️ No Changeset found

Latest commit: 06a334d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kerwanp kerwanp added the openapi-ts Relevant to the openapi-typescript library label Oct 14, 2024
Copy link
Contributor

@drwpow drwpow left a 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. */
Copy link
Contributor

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?

@MrFox131
Copy link

MrFox131 commented Oct 27, 2024

First of all, thank you for your time @FreeAoi .
Are there any estimations on how soon it will be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openapi-ts Relevant to the openapi-typescript library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for security and securitySchemes
4 participants