-
Notifications
You must be signed in to change notification settings - Fork 4k
Rework OpenAPI Authorizations + scopes #3786
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?
Conversation
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
8de5c04 to
89a92a2
Compare
6916faf to
99a0133
Compare
1682269 to
7a88f62
Compare
7a88f62 to
d1cb21e
Compare
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 adds a new "Required Scopes" disclosure section for OpenAPI operations that require authentication scopes. The refactoring extracts scope display logic from the securities section into a dedicated component and introduces state management for disclosure groups using Zustand stores.
- Adds
OpenAPIRequiredScopescomponent to display authentication scopes in a collapsible section - Implements
getOrCreateDisclosureStoreByKeyfor managing disclosure state across multiple instances - Refactors
OpenAPIDisclosureGroupto support synchronized state management via store keys - Updates styling to accommodate the new required scopes UI component
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react-openapi/src/getOrCreateDisclosureStoreByKey.ts | New file implementing Zustand store factory for disclosure group state management |
| packages/react-openapi/src/context.ts | Adds lock icon to the OpenAPI client context |
| packages/react-openapi/src/OpenAPISecurities.tsx | Refactors to use new OpenAPIRequiredScopes component and removes inline scope display logic |
| packages/react-openapi/src/OpenAPIRequiredScopes.tsx | New component for displaying required authentication scopes in a disclosure group |
| packages/react-openapi/src/OpenAPIDisclosureGroup.tsx | Adds state persistence via Zustand store and support for className prop |
| packages/react-openapi/src/OpenAPIDisclosure.tsx | Adds defaultExpanded prop and conditional rendering of label and panel |
| packages/gitbook/src/components/DocumentView/OpenAPI/style.css | Adds styling for required scopes component and refactors nested CSS selectors |
| packages/gitbook/src/components/DocumentView/OpenAPI/context.tsx | Provides lock icon implementation for GitBook context |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR reworks the Authorizations section + introduces a dedicated scopes section