这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@franworks
Copy link

@franworks franworks commented Sep 5, 2025

Resolves: #2599

This PR ensures that when a request defines a falsy options.body, and an options.bodySerializer, the body is serialized, and valid request data is sent in the request.

ensures request is sent with valid serialized or unserialized data

resolves: hey-api#2599, related: hey-api#2553
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Sep 5, 2025

⚠️ No Changeset found

Latest commit: 7048a91

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Sep 5, 2025

Someone is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. bug 🔥 Something isn't working client Client package related labels Sep 5, 2025
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@franworks
Copy link
Author

franworks commented Sep 5, 2025

@mrlubos, I ran the test:update command to update the snapshots and files that I was not expecting to change were updated. Have you seen this before?

@franworks
Copy link
Author

NVM - i needed to update my dependencies

@franworks franworks force-pushed the fix/#2599-serialize-valid-falsy-values-in-axios-client branch from ae35a98 to 7048a91 Compare September 5, 2025 04:12
@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 5, 2025

Open in StackBlitz

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/codegen-core@2600
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/nuxt@2600
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@2600
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/vite-plugin@2600

commit: 7048a91

@codecov
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 24.18%. Comparing base (01b8086) to head (7048a91).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...src/plugins/@hey-api/client-axios/bundle/client.ts 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2600      +/-   ##
==========================================
+ Coverage   24.05%   24.18%   +0.12%     
==========================================
  Files         363      363              
  Lines       36585    36596      +11     
  Branches     1628     1644      +16     
==========================================
+ Hits         8802     8849      +47     
+ Misses      27770    27734      -36     
  Partials       13       13              
Flag Coverage Δ
unittests 24.18% <92.30%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@mrlubos mrlubos left a comment

Choose a reason for hiding this comment

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

You're getting faster and faster 😀 I wonder if this function should be moved to the shared utils at some point

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 5, 2025
@mrlubos mrlubos merged commit 984cf2b into hey-api:main Sep 5, 2025
12 of 13 checks passed
@franworks
Copy link
Author

You're getting faster and faster 😀 I wonder if this function should be moved to the shared utils at some point

I was wondering the same thing - thought it might be a good follow up PR. If the shared utils (ie client-core utils) directory is the place, I could move it there.

I will create an issue and submit a PR with that improvement.

As I was looking through the clients, there are other opportunities to reduce duplication and improve consistency.

I will create an issue to start the discussion.

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

Labels

bug 🔥 Something isn't working client Client package related lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Axios client does not serialize valid falsy values

2 participants