OpenAPI: encode parameter encoding

This commit is contained in:
Fuma Nama
2026-01-07 19:36:40 +08:00
parent 9f06196f1c
commit e55510b4d7
2 changed files with 11 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"fumadocs-openapi": patch
---
fix unknown parameter encoding
@@ -35,9 +35,12 @@ export function encodeRequestData(
const value = from[type][key];
if (value == null) continue;
const field = parameters.find((p) => p.name === key && p.in === type);
// skip unknown parameters
if (!field) continue;
const field: NoReference<ParameterObject> = parameters.find(
(p) => p.name === key && p.in === type,
) ?? {
name: key,
in: type,
};
const encoder = getMediaEncoder(field, adapters);
if (encoder) {