swagger-api / swagger-js

Javascript library to connect to swagger-enabled APIs via browser or nodejs
http://swagger.io
Apache License 2.0
2.62k stars 760 forks source link

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

Closed glowcloud closed 6 months ago

glowcloud commented 6 months ago

Refs #3438

char0n commented 6 months ago

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.

swagger-bot commented 6 months ago

:tada: This PR is included in version 3.26.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: