Skip to content

Commit 47a47de

Browse files
fix(core): resolved build issues
1 parent 1d7816e commit 47a47de

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/core/src/utils.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ export async function generateValidatorDocs<
1818
{};
1919

2020
if (target === "form" || target === "json") {
21-
let media = target === "json" ? "application/json" : "multipart/form-data"
22-
if (!docs.requestBody || !docs.requestBody.content){
21+
const media =
22+
target === "json" ? "application/json" : "multipart/form-data";
23+
if (
24+
!docs.requestBody ||
25+
!("content" in docs.requestBody) ||
26+
!docs.requestBody.content
27+
) {
2328
docs.requestBody = {
2429
content: {
2530
[media]: {
@@ -32,7 +37,6 @@ export async function generateValidatorDocs<
3237
schema: result.schema,
3338
};
3439
}
35-
3640
} else {
3741
const parameters: (
3842
| OpenAPIV3.ReferenceObject

0 commit comments

Comments
 (0)