Skip to content

Conversation

nolannbiron
Copy link
Member

@nolannbiron nolannbiron commented Oct 14, 2025

Demo

CleanShot 2025-10-14 at 22 38 20@2x

Copy link

linear bot commented Oct 14, 2025

Copy link

changeset-bot bot commented Oct 14, 2025

🦋 Changeset detected

Latest commit: befda7d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@gitbook/react-openapi Patch
gitbook Patch

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

Copy link

argos-ci bot commented Oct 14, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2 (Inspect) 👍 Changes approved 4 changed, 4 added Oct 16, 2025, 10:41 AM
v2-cloudflare (Inspect) 👍 Changes approved 5 changed Oct 16, 2025, 10:45 AM
v2-vercel (Inspect) 👍 Changes approved 8 changed Oct 16, 2025, 10:44 AM

Copy link
Contributor

@Copilot Copilot AI left a 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.

@nolannbiron nolannbiron merged commit 8ce7322 into main Oct 16, 2025
16 checks passed
@nolannbiron nolannbiron deleted the nolann/rnd-8383-display-different-servers-in-the-openapi-block branch October 16, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants