Skip to content

fix(openapi): preserve simple path array separators - #496

Merged
punkpeye merged 2 commits into
punkpeye:mainfrom
remote-controlled-man:codex/prflow-08558a083522
Nov 5, 2026
Merged

punkpeye merged 2 commits into
punkpeye:mainfrom
remote-controlled-man:codex/prflow-08558a083522

Conversation

@remote-controlled-man

Copy link
Copy Markdown
Contributor

Simple-style path arrays currently escape the entire stringified array, so ["blue,green", "red/white"] requests /colors/blue%2Cgreen%2Cred%2Fwhite. Encode each scalar item before joining with commas instead, producing /colors/blue%2Cgreen,red%2Fwhite as required by OpenAPI simple serialization.

This covers omitted/default style and either explode flag. Regression tests exercise referenced parameters through generated MCP tools, reserved characters, empty items/arrays, repeated placeholders and the existing dot-segment guard. Scalar values and unsupported path styles keep their current behavior; no dependencies change.

Validation on macOS:

  • Node 24.21.0 and 26.13.0: pnpm lint and pnpm test pass, with 1465 tests across 85 files on each version.
  • Node 24: pnpm test:openapi passes all 15 benchmark/live tests. The existing helper warned about PostHog's unstable schema hash and proceeded with the freshly downloaded spec; no pins changed.
  • pnpm build and npm pack --dry-run --json pass. The package has 53 files, with no temporary tools or fixtures.
  • A generated tool call through the built ESM entry point produces the expected URL above.

Prepared with AI assistance and independently reviewed before publication.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 06:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@punkpeye

punkpeye commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Pushed a small follow-up: the style JSDoc in types.ts / schemas.ts now mentions path arrays. Comments only. Thanks!

@punkpeye
punkpeye merged commit b094c60 into punkpeye:main Nov 5, 2026
3 checks passed
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 4.24.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants