@kubb/adapter-oas 5.15.0 → 5.15.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 +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var compatibility = {
|
|
|
19
19
|
"node": ">=22.22"
|
|
20
20
|
};
|
|
21
21
|
// package.json
|
|
22
|
-
var version = "5.15.
|
|
22
|
+
var version = "5.15.1";
|
|
23
23
|
// src/constants.ts
|
|
24
24
|
/**
|
|
25
25
|
* Default parser options applied when no explicit options are provided.
|
|
@@ -2924,7 +2924,7 @@ const adapterOas = defineExtension({
|
|
|
2924
2924
|
function parseInput({ document, refs, schemas, pointers, parseSchema }) {
|
|
2925
2925
|
const parsedByName = /* @__PURE__ */ new Map();
|
|
2926
2926
|
const refAliasMap = /* @__PURE__ */ new Map();
|
|
2927
|
-
const enumNames =
|
|
2927
|
+
const enumNames = /* @__PURE__ */ new Set();
|
|
2928
2928
|
const discriminatorParentNodes = [];
|
|
2929
2929
|
for (const [name, schema] of Object.entries(schemas)) {
|
|
2930
2930
|
const node = {
|
|
@@ -2937,10 +2937,10 @@ const adapterOas = defineExtension({
|
|
|
2937
2937
|
parsedByName.set(name, node);
|
|
2938
2938
|
scanSchema(node);
|
|
2939
2939
|
if (node.type === "ref" && node.name) refAliasMap.set(name, node);
|
|
2940
|
-
if (ast.narrowSchema(node, "enum") && node.name) enumNames.
|
|
2940
|
+
if (ast.narrowSchema(node, "enum") && node.name) enumNames.add(node.name);
|
|
2941
2941
|
if (discriminator === "propagate" && (schema.oneOf ?? schema.anyOf) && schema.discriminator?.propertyName) discriminatorParentNodes.push(node);
|
|
2942
2942
|
}
|
|
2943
|
-
const circularNames =
|
|
2943
|
+
const circularNames = ast.findCircularSchemas([...parsedByName.values()]);
|
|
2944
2944
|
const discriminatorChildMap = discriminatorParentNodes.length > 0 ? buildDiscriminatorChildMap(discriminatorParentNodes) : null;
|
|
2945
2945
|
const operationNodes = getOperations(document, refs).map((operation) => parseOperation({
|
|
2946
2946
|
operation,
|
|
@@ -2950,7 +2950,7 @@ const adapterOas = defineExtension({
|
|
|
2950
2950
|
parseSchema
|
|
2951
2951
|
}));
|
|
2952
2952
|
const promotedEnums = enums === "root" ? collectInlineEnums([...parsedByName.values(), ...operationNodes], new Set(Object.keys(schemas))) : null;
|
|
2953
|
-
if (promotedEnums) for (const name of promotedEnums.keys()) enumNames.
|
|
2953
|
+
if (promotedEnums) for (const name of promotedEnums.keys()) enumNames.add(name);
|
|
2954
2954
|
const aliasTargetOf = (name) => {
|
|
2955
2955
|
const node = refAliasMap.get(name);
|
|
2956
2956
|
return node?.ref ? ast.refName(node.ref) : node?.name;
|