-
Notifications
You must be signed in to change notification settings - Fork 4k
Enhance OpenAPI security scopes handling #3712
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
base: main
Are you sure you want to change the base?
Enhance OpenAPI security scopes handling #3712
Conversation
🦋 Changeset detectedLatest commit: 35b892e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Pull Request Overview
This PR enhances OpenAPI security scopes handling by refactoring type definitions and improving OAuth2 scope resolution. The changes add support for resolved scope types, better OAuth2 flow handling, and an improved UI for displaying security scopes.
- Renamed
OpenAPISecuritySchemeWithRequired
toOpenAPICustomSecurityScheme
and added scope resolution - Enhanced OAuth2 security scheme handling with proper scope merging from flows and operation requirements
- Updated UI components to display security scopes in a more structured format
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
packages/react-openapi/src/types.ts | Renamed security scheme type and added scope type definitions |
packages/react-openapi/src/resolveOpenAPIOperation.ts | Added scope resolution logic for OAuth2 and other security schemes |
packages/react-openapi/src/utils.ts | Updated type references and improved type filtering |
packages/react-openapi/src/util/tryit-prefill.ts | Updated type references for consistency |
packages/react-openapi/src/OpenAPISecurities.tsx | Refactored OAuth2 scope display and added dedicated scope components |
packages/gitbook/src/components/DocumentView/OpenAPI/style.css | Extended CSS classes for scope styling |
.changeset/clever-ducks-double.md | Added changeset documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
2424bcf
to
35b892e
Compare
@nolannbiron where can we see a preview of it? |
@gregberge Also wondering if we should rename “Available scopes” to “Required scopes”, makes more sense |
Required scopes is better |
This PR refactors OpenAPI security scopes, adds resolved scope types, improves OAuth2 handling, and updates the UI.