@kubb/adapter-oas 5.13.0 → 5.13.1
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 +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -36,7 +36,7 @@ var compatibility = {
|
|
|
36
36
|
};
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region package.json
|
|
39
|
-
var version = "5.13.
|
|
39
|
+
var version = "5.13.1";
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/constants.ts
|
|
42
42
|
/**
|
|
@@ -2040,6 +2040,7 @@ function convertNumeric(context, type) {
|
|
|
2040
2040
|
* `options.unknownType`, otherwise parses it as a regular schema.
|
|
2041
2041
|
*/
|
|
2042
2042
|
function resolveMapSchema(mapSchema, { options, parse }) {
|
|
2043
|
+
if (mapSchema === false) return _kubb_kit.ast.factory.createSchema({ type: "never" });
|
|
2043
2044
|
if (mapSchema === true || typeof mapSchema === "object" && Object.keys(mapSchema).length === 0) return _kubb_kit.ast.factory.createSchema({ type: options.unknownType });
|
|
2044
2045
|
return parse({ schema: mapSchema });
|
|
2045
2046
|
}
|
|
@@ -2099,6 +2100,10 @@ function convertObject({ schema, name, nullable, defaultValue, options, parse })
|
|
|
2099
2100
|
options,
|
|
2100
2101
|
parse
|
|
2101
2102
|
})])) : void 0;
|
|
2103
|
+
const propertyNames = "propertyNames" in schema && schema.propertyNames !== void 0 ? resolveMapSchema(schema.propertyNames, {
|
|
2104
|
+
options,
|
|
2105
|
+
parse
|
|
2106
|
+
}) : void 0;
|
|
2102
2107
|
const objectNode = createNode({
|
|
2103
2108
|
schema,
|
|
2104
2109
|
name,
|
|
@@ -2110,6 +2115,7 @@ function convertObject({ schema, name, nullable, defaultValue, options, parse })
|
|
|
2110
2115
|
properties,
|
|
2111
2116
|
additionalProperties: additionalPropertiesNode,
|
|
2112
2117
|
patternProperties,
|
|
2118
|
+
propertyNames,
|
|
2113
2119
|
minProperties: schema.minProperties,
|
|
2114
2120
|
maxProperties: schema.maxProperties
|
|
2115
2121
|
});
|
|
@@ -2235,7 +2241,7 @@ const schemaRules = [
|
|
|
2235
2241
|
convert: convertEnum
|
|
2236
2242
|
},
|
|
2237
2243
|
{
|
|
2238
|
-
match: ({ schema, type }) => type === "object" || !!schema.properties || !!schema.additionalProperties || "patternProperties" in schema,
|
|
2244
|
+
match: ({ schema, type }) => type === "object" || !!schema.properties || !!schema.additionalProperties || "patternProperties" in schema || "propertyNames" in schema,
|
|
2239
2245
|
convert: convertObject
|
|
2240
2246
|
},
|
|
2241
2247
|
{
|