-
Notifications
You must be signed in to change notification settings - Fork 4k
Add OpenAPI servers selection #3726
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
Add OpenAPI servers selection #3726
Conversation
🦋 Changeset detectedLatest commit: befda7d 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 |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
33011ca
to
c5e3289
Compare
c5e3289
to
1aacd43
Compare
1aacd43
to
8dc3b61
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 OpenAPI servers selection functionality that allows users to choose between multiple servers in an OpenAPI specification. The implementation includes a dropdown selector for servers when multiple servers are available, with enhanced UI components for better user experience.
- Refactored OpenAPIPath component to support multiple servers with a new server selection interface
- Added new UI components including OpenAPITooltip, OpenAPIPathItem, and OpenAPIPathMultipleServers for improved modularity
- Enhanced OpenAPISelect component with better icon handling and styling options
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
packages/react-openapi/src/types.ts | Added optional name property to OpenAPIServerWithCustomProperties type |
packages/react-openapi/src/formatPath.tsx | Extracted path formatting logic into standalone utility function |
packages/react-openapi/src/context.ts | Added copy and check icons to OpenAPIClientContext interface |
packages/react-openapi/src/OpenAPITooltip.tsx | New tooltip component wrapper around react-aria-components |
packages/react-openapi/src/OpenAPISelect.tsx | Enhanced select component with improved icon handling and prop updates |
packages/react-openapi/src/OpenAPIPathMultipleServers.tsx | New component for handling multiple server selection with dropdown |
packages/react-openapi/src/OpenAPIPathItem.tsx | New shared component for rendering path items with copy functionality |
packages/react-openapi/src/OpenAPIPath.tsx | Refactored to use new components and support multiple servers |
packages/react-openapi/src/OpenAPIDisclosureGroup.tsx | Updated to use new onChange prop instead of onSelectionChange |
packages/react-openapi/src/OpenAPICopyButton.tsx | Updated to use new OpenAPITooltip component |
packages/react-openapi/src/OpenAPICodeSampleInteractive.tsx | Simplified MediaTypeSelector implementation |
packages/react-openapi/src/InteractiveSection.tsx | Updated to use new onChange prop instead of onSelectionChange |
packages/gitbook/src/components/DocumentView/OpenAPI/style.css | Added styles for new components and improved path display |
packages/gitbook/src/components/DocumentView/OpenAPI/context.tsx | Added copy and check icons to context |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Demo