We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d7816e commit 47a47deCopy full SHA for 47a47de
packages/core/src/utils.ts
@@ -18,8 +18,13 @@ export async function generateValidatorDocs<
18
{};
19
20
if (target === "form" || target === "json") {
21
- let media = target === "json" ? "application/json" : "multipart/form-data"
22
- if (!docs.requestBody || !docs.requestBody.content){
+ const media =
+ target === "json" ? "application/json" : "multipart/form-data";
23
+ if (
24
+ !docs.requestBody ||
25
+ !("content" in docs.requestBody) ||
26
+ !docs.requestBody.content
27
+ ) {
28
docs.requestBody = {
29
content: {
30
[media]: {
@@ -32,7 +37,6 @@ export async function generateValidatorDocs<
32
37
schema: result.schema,
33
38
};
34
39
}
35
-
36
40
} else {
41
const parameters: (
42
| OpenAPIV3.ReferenceObject
0 commit comments