Skip to content

Fix missing headers in OpenAPIResponses #3074

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

nolannbiron
Copy link
Member

Fixes RND-6772

Copy link

linear bot commented Apr 1, 2025

Copy link

changeset-bot bot commented Apr 1, 2025

🦋 Changeset detected

Latest commit: 0694dbf

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 addresses the missing header display issue in the OpenAPIResponses component by adding logic to create a default tab when headers are present but no content is provided. It also updates the rendering logic in OpenAPIResponse and records the changes in the changeset.

  • Adds a new tabs creation logic to handle cases where only headers exist.
  • Updates OpenAPIResponse to conditionally render schema properties.
  • Updates the changeset file to reflect a patch release.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/react-openapi/src/OpenAPIResponses.tsx Adds header check logic to generate a default tab when no content exists.
packages/react-openapi/src/OpenAPIResponse.tsx Adjusts conditional rendering of schema properties for valid media types.
.changeset/afraid-impalas-bow.md Updates changeset metadata with patch version and description.

Copy link

argos-ci bot commented Apr 1, 2025

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

Build Status Details Updated (UTC)
customers-v1 (Inspect) ✅ No changes detected - Apr 1, 2025, 7:28 PM
customers-v2 (Inspect) 👍 Changes approved 4 changed Apr 1, 2025, 7:29 PM
default (Inspect) 👍 Changes approved 1 changed Apr 1, 2025, 7:32 PM
v2-vercel (Inspect) 👍 Changes approved 4 removed, 1 failure Apr 1, 2025, 7:34 PM

@nolannbiron nolannbiron merged commit da7b369 into main Apr 1, 2025
17 of 18 checks passed
@nolannbiron nolannbiron deleted the nolann/fix-missing-headers-responses branch April 1, 2025 19:57
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