Skip to content

Conversation

@nolannbiron
Copy link
Member

No description provided.

@linear
Copy link

linear bot commented Nov 10, 2025

@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

🦋 Changeset detected

Latest commit: 10a9b3d

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 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 heredoc support for cURL code samples when JSON bodies contain single quotes, preventing shell escaping issues. The changes refactor the cURL generator to use a new buildHeredoc utility function that handles both regular command-line continuation and heredoc formatting.

  • Introduces heredoc syntax (--data @- <<'EOF') for JSON bodies containing single quotes
  • Refactors cURL line joining logic into a reusable buildHeredoc function
  • Maintains backward compatibility for JSON bodies without single quotes

Reviewed Changes

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

File Description
packages/react-openapi/src/code-samples.ts Adds buildHeredoc function and updates JSON body generation to use heredoc when single quotes are present
.changeset/big-jeans-press.md Documents the patch change for heredoc support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@argos-ci
Copy link

argos-ci bot commented Nov 10, 2025

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

Build Status Details Updated (UTC)
customers-v2 (Inspect) 👍 Changes approved 2 changed Nov 10, 2025, 9:06 AM
v2-cloudflare (Inspect) 👍 Changes approved 2 changed Nov 10, 2025, 9:10 AM
v2-vercel (Inspect) 👍 Changes approved 6 changed Nov 10, 2025, 9:09 AM

@nolannbiron nolannbiron merged commit b4a021a into main Nov 10, 2025
16 checks passed
@nolannbiron nolannbiron deleted the nolann/rnd-8506-the-curl-sample-is-invalid-when-a-query-param-or-json-value branch November 10, 2025 10:20
clairechabas added a commit that referenced this pull request Nov 10, 2025
…e-option

* main: (48 commits)
  Edgeless Assistant window on `depth: flat` sites (#3788)
  Add heredoc support for cURL JSON body (#3790)
  Update site layout and blocks with container queries (#3780)
  Rework OpenAPI Authorizations + scopes (#3786)
  Support custom cover heights (#3779)
  Update `DropdownMenu` styling (#3787)
  Treat pages without visible TOC items as `no-toc` (#3783)
  Implement unique title tags for sections & variants (#3768)
  Add page breadcrumbs to search results (#3784)
  Expand code block when printing (#3782)
  Disable Workers Observability (#3781)
  Reword "Everywhere" search scope to "All docs" (#3776)
  Add padding to TOC page group items (#3777)
  Improve OAuth2 scopes handling in OpenAPI (#3775)
  Support translations and generic variants together (#3772)
  Initialize hash on mount and improve navigation handling (#3774)
  Revert "Support cover image heights and positioning changes" (#3771)
  Fix search container shadow (#3770)
  Redirect to space base path on fallback true (#3745)
  Add isRoot prop to PagesList for root header offset (#3759)
  ...
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.

3 participants