@kubb/adapter-oas 5.28.4 → 5.28.6
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 +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -18,7 +18,7 @@ var compatibility = {
|
|
|
18
18
|
"node": ">=22.22"
|
|
19
19
|
};
|
|
20
20
|
// package.json
|
|
21
|
-
var version = "5.28.
|
|
21
|
+
var version = "5.28.6";
|
|
22
22
|
// src/constants.ts
|
|
23
23
|
/**
|
|
24
24
|
* Default parser options applied when no explicit options are provided.
|
|
@@ -960,8 +960,10 @@ require_rolldown_runtime.__name(parse$1, "parse");
|
|
|
960
960
|
function rememberEvents({ source, events }) {
|
|
961
961
|
indexes.set(source, indexEvents(events));
|
|
962
962
|
}
|
|
963
|
+
const withoutAllOf = (pointer) => pointer.replace(/\/allOf\/\d+(?=\/|$)/g, "");
|
|
963
964
|
/**
|
|
964
|
-
* Maps OpenAPI JSON pointers and unresolved references to ranges in YAML or JSON source.
|
|
965
|
+
* Maps OpenAPI JSON pointers and unresolved references to ranges in YAML or JSON source. A pointer through an `allOf`
|
|
966
|
+
* the spec does not have falls back to the same pointer without its `allOf` steps.
|
|
965
967
|
*/
|
|
966
968
|
const locate = (source, location) => {
|
|
967
969
|
if (!("pointer" in location)) return void 0;
|
|
@@ -972,7 +974,8 @@ const locate = (source, location) => {
|
|
|
972
974
|
source
|
|
973
975
|
});
|
|
974
976
|
const ref = "ref" in location ? location.ref : void 0;
|
|
975
|
-
|
|
977
|
+
const flattened = withoutAllOf(location.pointer);
|
|
978
|
+
return locator.find(location.pointer) ?? (flattened === location.pointer ? void 0 : locator.find(flattened)) ?? (ref ? locator.findRef(ref) : void 0);
|
|
976
979
|
};
|
|
977
980
|
// src/load/source.ts
|
|
978
981
|
const urlRegExp = /^https?:\/+/i;
|