@kubb/adapter-oas 5.0.0-alpha.56 → 5.0.0-alpha.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/parser.ts +6 -9
- package/src/resolvers.ts +5 -4
package/dist/index.js
CHANGED
|
@@ -1060,9 +1060,8 @@ function buildSchemaNode(schema, name, nullable, defaultValue) {
|
|
|
1060
1060
|
function getRequestBodyContentTypes(document, operation) {
|
|
1061
1061
|
if (operation.schema.requestBody) operation.schema.requestBody = dereferenceWithRef(document, operation.schema.requestBody);
|
|
1062
1062
|
const body = operation.schema.requestBody;
|
|
1063
|
-
if (!body
|
|
1064
|
-
|
|
1065
|
-
return inline.content ? Object.keys(inline.content) : [];
|
|
1063
|
+
if (!body) return [];
|
|
1064
|
+
return body.content ? Object.keys(body.content) : [];
|
|
1066
1065
|
}
|
|
1067
1066
|
//#endregion
|
|
1068
1067
|
//#region src/parser.ts
|
|
@@ -1656,11 +1655,10 @@ function createSchemaParser(ctx) {
|
|
|
1656
1655
|
*/
|
|
1657
1656
|
function getRequestBodyMeta(operation) {
|
|
1658
1657
|
const body = operation.schema.requestBody;
|
|
1659
|
-
if (!body
|
|
1660
|
-
const inline = body;
|
|
1658
|
+
if (!body) return { required: false };
|
|
1661
1659
|
return {
|
|
1662
|
-
description:
|
|
1663
|
-
required:
|
|
1660
|
+
description: body.description,
|
|
1661
|
+
required: body.required === true
|
|
1664
1662
|
};
|
|
1665
1663
|
}
|
|
1666
1664
|
/**
|