8000 Deduplicate path parameters from OpenAPI spec by nolannbiron · Pull Request #3264 · GitbookIO/gitbook · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Deduplicate path parameters from OpenAPI spec #3264

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

Conversation

nolannbiron
Copy link
Member

No description provided.

Copy link
linear bot commented May 26, 2025

Copy link
changeset-bot bot commented May 26, 2025

🦋 Changeset detected

Latest commit: c4b150e

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
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 deduplicates duplicate OpenAPI path parameters by filtering out duplicates based on their name and location.

  • Replace the direct usage of operation parameters with a deduplicated list.
  • Introduce a helper function (deduplicateParameters) to encapsulate the deduplication logic.
  • Update the changeset file to indicate the deduplication improvement.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/react-openapi/src/OpenAPISpec.tsx Replaces the parameter list with a deduplicated one using a helper function and adds the deduplication function.
.changeset/violet-schools-care.md Adds a changeset entry to document the deduplication change.
Comments suppressed due to low confidence (1)

packages/react-openapi/src/OpenAPISpec.tsx:121

  • Consider adding unit tests to confirm that the deduplication logic works as expected for various scenarios, including edge cases where parameters only differ in case or other properties.
function deduplicateParameters(parameters: OpenAPI.Parameters): OpenAPI.Parameters {

Copy link
argos-ci bot commented May 26, 2025

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

Build Status Details Updated (UTC)
customers-v1 (Inspect) 👍 Changes approved 4 changed May 26, 2025, 4:43 PM
customers-v2 (Inspect) 👍 Changes approved 79 changed May 26, 2025, 4:45 PM
default (Inspect) ✅ No changes detected - May 26, 2025, 4:45 PM
v2-cloudflare (Inspect) ✅ No changes detected - May 26, 2025, 4:48 PM
v2-vercel (Inspect) ✅ No changes detected - May 26, 2025, 4:49 PM

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
0