@scalar/fastify-api-reference 1.25.101 → 1.25.103
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/CHANGELOG.md +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +30 -31
- package/dist/js/standalone.js +7267 -7225
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -18472,48 +18472,47 @@ function makeFilesystem(value, overwrites = {}) {
|
|
|
18472
18472
|
}
|
|
18473
18473
|
];
|
|
18474
18474
|
}
|
|
18475
|
-
function resolveReferences(input, options, file, errors2) {
|
|
18476
|
-
if (errors2 === void 0) {
|
|
18477
|
-
errors2 = [];
|
|
18478
|
-
}
|
|
18475
|
+
function resolveReferences(input, options, file, errors2 = []) {
|
|
18479
18476
|
const clonedInput = structuredClone(input);
|
|
18480
18477
|
const filesystem = makeFilesystem(clonedInput);
|
|
18481
18478
|
const entrypoint = getEntrypoint(filesystem);
|
|
18482
|
-
|
|
18479
|
+
const finalInput = (file == null ? void 0 : file.specification) ?? entrypoint.specification;
|
|
18480
|
+
dereference$1(finalInput, filesystem, file ?? entrypoint, /* @__PURE__ */ new WeakSet(), errors2, options);
|
|
18483
18481
|
errors2 = errors2.filter((error2, index, self) => index === self.findIndex((t) => t.message === error2.message && t.code === error2.code));
|
|
18484
18482
|
return {
|
|
18485
18483
|
valid: errors2.length === 0,
|
|
18486
18484
|
errors: errors2,
|
|
18487
|
-
schema:
|
|
18485
|
+
schema: finalInput
|
|
18488
18486
|
};
|
|
18489
|
-
|
|
18490
|
-
|
|
18491
|
-
|
|
18492
|
-
|
|
18493
|
-
|
|
18494
|
-
|
|
18495
|
-
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
|
|
18508
|
-
}
|
|
18487
|
+
}
|
|
18488
|
+
function dereference$1(schema2, filesystem, entrypoint, resolvedSchemas, errors2, options) {
|
|
18489
|
+
var _a;
|
|
18490
|
+
if (schema2 === null || resolvedSchemas.has(schema2))
|
|
18491
|
+
return;
|
|
18492
|
+
resolvedSchemas.add(schema2);
|
|
18493
|
+
function resolveExternal(externalFile) {
|
|
18494
|
+
dereference$1(externalFile.specification, filesystem, externalFile, resolvedSchemas, errors2, options);
|
|
18495
|
+
return externalFile;
|
|
18496
|
+
}
|
|
18497
|
+
while (schema2.$ref !== void 0) {
|
|
18498
|
+
const resolved = resolveUri(schema2.$ref, options, entrypoint, filesystem, resolveExternal, errors2);
|
|
18499
|
+
if (typeof resolved !== "object" || resolved === null)
|
|
18500
|
+
break;
|
|
18501
|
+
const dereferencedRef = schema2.$ref;
|
|
18502
|
+
delete schema2.$ref;
|
|
18503
|
+
for (const key of Object.keys(resolved)) {
|
|
18504
|
+
if (schema2[key] === void 0) {
|
|
18505
|
+
schema2[key] = resolved[key];
|
|
18509
18506
|
}
|
|
18510
18507
|
}
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18514
|
-
|
|
18508
|
+
if (dereferencedRef) {
|
|
18509
|
+
(_a = options == null ? void 0 : options.onDereference) == null ? void 0 : _a.call(options, { schema: schema2, ref: dereferencedRef });
|
|
18510
|
+
}
|
|
18511
|
+
}
|
|
18512
|
+
for (const value of Object.values(schema2)) {
|
|
18513
|
+
if (typeof value === "object" && value !== null) {
|
|
18514
|
+
dereference$1(value, filesystem, entrypoint, resolvedSchemas, errors2, options);
|
|
18515
18515
|
}
|
|
18516
|
-
return result;
|
|
18517
18516
|
}
|
|
18518
18517
|
}
|
|
18519
18518
|
function resolveUri(uri2, options, file, filesystem, resolve2, errors2) {
|