Skip to content
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

fix(execute): skip undefined parameters in body and path request builders for OpenAPI 2.0 #3439

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

glowcloud
Copy link
Contributor

Refs #3438

@char0n
Copy link
Member

char0n commented Mar 26, 2024

Note related to bodyBuilder - it seems that according to the fetch API spec, when body is either undefined or "" (empty string), it is not being sent at all.

But given that we currently use 3 Fetch API implementations (browser Fetch API, Node.js Fetch API and node-fetch) it's probably better to remove the body instead of passing it with undefined value.

Copy link
Member

@char0n char0n left a comment

Choose a reason for hiding this comment

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

LGTM! Added one note: #3439 (comment)

@char0n char0n merged commit 1db6ba3 into master Mar 26, 2024
5 checks passed
@char0n char0n deleted the issue-3438 branch March 26, 2024 09:11
swagger-bot pushed a commit that referenced this pull request Mar 26, 2024
## [3.26.4](v3.26.3...v3.26.4) (2024-03-26)

### Bug Fixes

* **execute:** skip undefined parameters in body and path request builders for OpenAPI 2.0 ([#3439](#3439)) ([1db6ba3](1db6ba3)), closes [#3438](#3438)
@swagger-bot
Copy link
Contributor

🎉 This PR is included in version 3.26.4 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants