@kubb/adapter-oas 5.5.4 → 5.5.5
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 +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -429,7 +429,7 @@ async function resolveSource(sourcePath) {
|
|
|
429
429
|
* its parse error instead.
|
|
430
430
|
*/
|
|
431
431
|
async function assertInputExists(input) {
|
|
432
|
-
if (
|
|
432
|
+
if (urlRegExp.test(input)) return;
|
|
433
433
|
if (!await exists(input)) throw new Diagnostics.Error({
|
|
434
434
|
code: Diagnostics.code.inputNotFound,
|
|
435
435
|
severity: "error",
|
|
@@ -518,7 +518,7 @@ async function parseDocument(pathOrApi) {
|
|
|
518
518
|
*/
|
|
519
519
|
async function parseFromConfig(source) {
|
|
520
520
|
if (source.type === "data") return parseDocument(typeof source.data === "string" ? parse(source.data) : structuredClone(source.data));
|
|
521
|
-
if (
|
|
521
|
+
if (urlRegExp.test(source.path)) return parseDocument(source.path);
|
|
522
522
|
const resolved = path.resolve(path.dirname(source.path), source.path);
|
|
523
523
|
await assertInputExists(resolved);
|
|
524
524
|
return parseDocument(resolved);
|
|
@@ -1993,7 +1993,7 @@ function walkPointer(document, $ref) {
|
|
|
1993
1993
|
applicable: false,
|
|
1994
1994
|
value: null
|
|
1995
1995
|
};
|
|
1996
|
-
const pointer =
|
|
1996
|
+
const pointer = trimmed.substring(1);
|
|
1997
1997
|
let docCache = _refCache.get(document);
|
|
1998
1998
|
if (!docCache) {
|
|
1999
1999
|
docCache = /* @__PURE__ */ new Map();
|
|
@@ -2003,7 +2003,7 @@ function walkPointer(document, $ref) {
|
|
|
2003
2003
|
applicable: true,
|
|
2004
2004
|
value: docCache.get(pointer)
|
|
2005
2005
|
};
|
|
2006
|
-
const current = pointer.split("/").filter(Boolean).reduce((obj, key) => obj?.[key], document);
|
|
2006
|
+
const current = pointer.split("/").filter(Boolean).map((token) => globalThis.decodeURIComponent(token).replaceAll("~1", "/").replaceAll("~0", "~")).reduce((obj, key) => obj?.[key], document);
|
|
2007
2007
|
if (current) docCache.set(pointer, current);
|
|
2008
2008
|
return {
|
|
2009
2009
|
applicable: true,
|