full site update

This commit is contained in:
2025-07-24 18:46:24 +02:00
parent bfe2b90d8d
commit 37a6e0ab31
6912 changed files with 540482 additions and 361712 deletions

View File

@@ -1,5 +1,7 @@
import { ignoreOverride } from "./Options.js";
import { selectParser } from "./selectParser.js";
import { getRelativePath } from "./getRelativePath.js";
import { parseAnyDef } from "./parsers/any.js";
export function parseDef(def, refs, forceResolution = false) {
const seenItem = refs.seen.get(def);
if (refs.override) {
@@ -43,20 +45,12 @@ const get$ref = (item, refs) => {
if (item.path.length < refs.currentPath.length &&
item.path.every((value, index) => refs.currentPath[index] === value)) {
console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
return {};
return parseAnyDef(refs);
}
return refs.$refStrategy === "seen" ? {} : undefined;
return refs.$refStrategy === "seen" ? parseAnyDef(refs) : undefined;
}
}
};
const getRelativePath = (pathA, pathB) => {
let i = 0;
for (; i < pathA.length && i < pathB.length; i++) {
if (pathA[i] !== pathB[i])
break;
}
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
};
const addMeta = (def, refs, jsonSchema) => {
if (def.description) {
jsonSchema.description = def.description;