Skip to content

feat(openapi-fetch): add support for pathSerializer option #2362

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

luxass
Copy link

@luxass luxass commented Jun 28, 2025

Changes

What does this PR change? Link to any related issue(s).

This PR adds support for setting path serializers yourself, either globally or per request. Similar to how bodySerializers & querySerializers work.

resolves #1660

How to Review

How can a reviewer review your changes? What should be kept in mind for this review?

Checklist

  • Unit tests updated
  • docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript)

luxass added 3 commits June 28, 2025 08:35
- Introduced `pathSerializer` to `ClientOptions` for enhanced path handling.
- Updated `createClient` function to utilize `pathSerializer` from options.
- Modified `createFinalURL` to apply the provided `pathSerializer`.
Copy link

netlify bot commented Jun 28, 2025

👷 Deploy request for openapi-ts pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 3ff91ad

Copy link

changeset-bot bot commented Jun 28, 2025

🦋 Changeset detected

Latest commit: 3ff91ad

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

This PR includes changesets to release 3 packages
Name Type
openapi-fetch Minor
openapi-react-query Major
swr-openapi Major

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

@luxass luxass marked this pull request as ready for review June 28, 2025 07:01
@luxass luxass requested a review from a team as a code owner June 28, 2025 07:01
@luxass luxass requested a review from drwpow June 28, 2025 07:01
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.

Allow for custom types in path params serialization (and maybe other places serialization too)
1 participant