@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.js
CHANGED
|
@@ -1192,7 +1192,7 @@ function createSchemaParser(ctx) {
|
|
|
1192
1192
|
* blowup — `customer` alone may be referenced from dozens of top-level schemas,
|
|
1193
1193
|
* each triggering a fresh recursive expansion of its entire sub-tree.
|
|
1194
1194
|
*
|
|
1195
|
-
*
|
|
1195
|
+
* Memoizing by `$ref` path reduces the overall work from O(2^depth) to O(N)
|
|
1196
1196
|
* where N is the number of unique schema names.
|
|
1197
1197
|
*/
|
|
1198
1198
|
const resolvedRefCache = /* @__PURE__ */ new Map();
|
|
@@ -1303,7 +1303,7 @@ function createSchemaParser(ctx) {
|
|
|
1303
1303
|
}));
|
|
1304
1304
|
return ast.createSchema({
|
|
1305
1305
|
type: "intersection",
|
|
1306
|
-
members: [...ast.
|
|
1306
|
+
members: [...ast.mergeAdjacentObjectsLazy(allOfMembers.slice(0, syntheticStart)), ...ast.mergeAdjacentObjectsLazy(allOfMembers.slice(syntheticStart))],
|
|
1307
1307
|
...buildSchemaNode(schema, name, nullable, defaultValue)
|
|
1308
1308
|
});
|
|
1309
1309
|
}
|
|
@@ -1881,7 +1881,7 @@ function parseOas(document, options = {}) {
|
|
|
1881
1881
|
name
|
|
1882
1882
|
}, mergedOptions));
|
|
1883
1883
|
const paths = new BaseOas(document).getPaths();
|
|
1884
|
-
const operations = Object.entries(paths).flatMap(([
|
|
1884
|
+
const operations = Object.entries(paths).flatMap(([, methods]) => Object.entries(methods).map(([, operation]) => operation ? _parseOperation(mergedOptions, operation) : null).filter((op) => op !== null));
|
|
1885
1885
|
return {
|
|
1886
1886
|
root: ast.createInput({
|
|
1887
1887
|
schemas,
|