Skip to content

Commit 25e12e3

Browse files
committed
Changeset
Signed-off-by: Sora Morimoto <[email protected]>
1 parent 36a852f commit 25e12e3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.changeset/loud-dancers-shake.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"swagger-typescript-api": patch
3+
---
4+
5+
Fix handling of FormData inputs in Fetch HTTP client
6+
7+
Previously, when users passed a `FormData` object directly to the Fetch
8+
client's `multipart/form-data` formatter, it would incorrectly attempt to use
9+
`Object.keys()` on the FormData instance, which returns an empty array. This
10+
caused the FormData to be processed incorrectly.
11+
12+
The fix adds a type check to return FormData instances unchanged, allowing
13+
users to have full control over FormData construction when needed whilst
14+
maintaining backwards compatibility for object inputs. This aligns the Fetch
15+
client behaviour with the existing Axios client implementation.
16+
17+
This resolves issues where users needed to send multipart requests with
18+
multiple entries for the same key, which is only possible with direct FormData
19+
manipulation.

0 commit comments

Comments
 (0)