OpenAPI: Remove explicit form data Content-Type

This commit is contained in:
Fuma Nama
2025-08-05 16:41:04 +08:00
parent 91db8df34a
commit 04a73eabe8
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-openapi': patch
---
Remove explicit form data `Content-Type`
+4 -1
View File
@@ -26,7 +26,10 @@ export function createBrowserFetcher(
return {
async fetch(url, options) {
const headers = new Headers();
if (options.bodyMediaType)
if (
options.bodyMediaType &&
options.bodyMediaType !== 'multipart/form-data'
)
headers.append('Content-Type', options.bodyMediaType);
for (const key in options.header) {