@kubb/adapter-oas 5.3.9 → 5.3.11
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 +3 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1116,9 +1116,13 @@ type SchemaObject$1 = {
|
|
|
1116
1116
|
*/
|
|
1117
1117
|
const?: string | number | boolean | null;
|
|
1118
1118
|
/**
|
|
1119
|
-
* OAS 3.1: media type of the schema content. `'application/octet-stream'`
|
|
1119
|
+
* OAS 3.1: media type of the schema content. Raw `'application/octet-stream'` content maps to `blob`.
|
|
1120
1120
|
*/
|
|
1121
1121
|
contentMediaType?: string;
|
|
1122
|
+
/**
|
|
1123
|
+
* OAS 3.1: encoding applied to string content, such as `base64`.
|
|
1124
|
+
*/
|
|
1125
|
+
contentEncoding?: string;
|
|
1122
1126
|
$ref?: string;
|
|
1123
1127
|
/**
|
|
1124
1128
|
* OAS 3.1: positional tuple items, replacing the multi-item `items` array from OAS 3.0.
|
package/dist/index.js
CHANGED
|
@@ -588,10 +588,10 @@ function isDiscriminator(obj) {
|
|
|
588
588
|
return !!obj && !!record["discriminator"] && typeof record["discriminator"] !== "string";
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
|
-
* Returns `true` when a schema is a binary payload
|
|
591
|
+
* Returns `true` when a schema is a raw binary payload.
|
|
592
592
|
*/
|
|
593
593
|
function isBinary(schema) {
|
|
594
|
-
return schema.
|
|
594
|
+
return schema.contentMediaType === "application/octet-stream" && schema.contentEncoding === void 0 && (schema.type === void 0 || schema.type === "string");
|
|
595
595
|
}
|
|
596
596
|
/**
|
|
597
597
|
* Returns the binary schema for an `application/octet-stream` entry the OAS 3.1 upgrade emptied
|
|
@@ -1647,8 +1647,7 @@ function convertBoolean({ schema, name, nullable, defaultValue }) {
|
|
|
1647
1647
|
});
|
|
1648
1648
|
}
|
|
1649
1649
|
/**
|
|
1650
|
-
* Converts a binary
|
|
1651
|
-
* into a `blob` node.
|
|
1650
|
+
* Converts a raw binary schema into a `blob` node.
|
|
1652
1651
|
*/
|
|
1653
1652
|
function convertBinary({ schema, name, nullable, defaultValue }) {
|
|
1654
1653
|
return createNode({
|