mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
OpenAPI: encode parameter encoding
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user