@kubb/adapter-oas 5.0.0-beta.14 → 5.0.0-beta.15
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 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/parser.ts +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1218,7 +1218,7 @@ function createSchemaParser(ctx) {
|
|
|
1218
1218
|
* blowup — `customer` alone may be referenced from dozens of top-level schemas,
|
|
1219
1219
|
* each triggering a fresh recursive expansion of its entire sub-tree.
|
|
1220
1220
|
*
|
|
1221
|
-
*
|
|
1221
|
+
* Memoizing by `$ref` path reduces the overall work from O(2^depth) to O(N)
|
|
1222
1222
|
* where N is the number of unique schema names.
|
|
1223
1223
|
*/
|
|
1224
1224
|
const resolvedRefCache = /* @__PURE__ */ new Map();
|
|
@@ -1329,7 +1329,7 @@ function createSchemaParser(ctx) {
|
|
|
1329
1329
|
}));
|
|
1330
1330
|
return _kubb_core.ast.createSchema({
|
|
1331
1331
|
type: "intersection",
|
|
1332
|
-
members: [..._kubb_core.ast.
|
|
1332
|
+
members: [..._kubb_core.ast.mergeAdjacentObjectsLazy(allOfMembers.slice(0, syntheticStart)), ..._kubb_core.ast.mergeAdjacentObjectsLazy(allOfMembers.slice(syntheticStart))],
|
|
1333
1333
|
...buildSchemaNode(schema, name, nullable, defaultValue)
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
@@ -1907,7 +1907,7 @@ function parseOas(document, options = {}) {
|
|
|
1907
1907
|
name
|
|
1908
1908
|
}, mergedOptions));
|
|
1909
1909
|
const paths = new oas.default(document).getPaths();
|
|
1910
|
-
const operations = Object.entries(paths).flatMap(([
|
|
1910
|
+
const operations = Object.entries(paths).flatMap(([, methods]) => Object.entries(methods).map(([, operation]) => operation ? _parseOperation(mergedOptions, operation) : null).filter((op) => op !== null));
|
|
1911
1911
|
return {
|
|
1912
1912
|
root: _kubb_core.ast.createInput({
|
|
1913
1913
|
schemas,
|