Support alternative security scope groups#3976
Conversation
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Pull request overview
Adds support for displaying multiple alternative required-scope sets for a single security scheme group (i.e., OR’d scope requirements), improving how OpenAPI security requirements are represented in the React OpenAPI UI.
Changes:
- Extend
OperationSecurityInfoto carryscopeAlternativesand compute alternatives fromsecurityRequiremententries. - Deduplicate/merge scopes per security scheme key when resolving an operation’s
securities. - Update required-scopes UI (and CSS) to render multiple scope alternatives with an “or” separator.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/react-openapi/src/utils.ts | Groups security requirements and collects required-scope alternatives per security scheme group. |
| packages/react-openapi/src/resolveOpenAPIOperation.ts | Resolves securities into a map to dedupe entries and merges scopes across occurrences. |
| packages/react-openapi/src/OpenAPIRequiredScopes.tsx | Renders required scopes as a list of alternatives when multiple sets exist. |
| packages/gitbook/src/components/DocumentView/OpenAPI/style.css | Adds styling for the new scope-alternatives layout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gregberge
left a comment
There was a problem hiding this comment.
Would be good to update GBX also.
Demo: