@kubb/adapter-oas 5.0.0-beta.65 → 5.0.0-beta.66
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 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1338,7 +1338,12 @@ function getRequestSchema(document, operation, options = {}) {
|
|
|
1338
1338
|
mediaType: options.contentType
|
|
1339
1339
|
});
|
|
1340
1340
|
if (requestBody === false) return null;
|
|
1341
|
+
const mediaType = Array.isArray(requestBody) ? requestBody[0] : options.contentType;
|
|
1341
1342
|
const schema = Array.isArray(requestBody) ? requestBody[1].schema : requestBody.schema;
|
|
1343
|
+
if (mediaType === "application/octet-stream" && (!schema || Object.keys(schema).length === 0)) return {
|
|
1344
|
+
type: "string",
|
|
1345
|
+
contentMediaType: "application/octet-stream"
|
|
1346
|
+
};
|
|
1342
1347
|
if (!schema) return null;
|
|
1343
1348
|
return dereferenceWithRef(document, schema);
|
|
1344
1349
|
}
|