@scalar/fastify-api-reference 1.25.77 → 1.25.79

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.js CHANGED
@@ -18466,15 +18466,15 @@ function resolveReferences(input, options, file, errors2) {
18466
18466
  const clonedInput = structuredClone(input);
18467
18467
  const filesystem = makeFilesystem(clonedInput);
18468
18468
  const entrypoint = getEntrypoint(filesystem);
18469
- resolve2((file == null ? void 0 : file.specification) ?? entrypoint.specification, filesystem, file ?? entrypoint);
18470
- resolve2((file == null ? void 0 : file.specification) ?? entrypoint.specification, filesystem, file ?? entrypoint);
18469
+ resolve2((file == null ? void 0 : file.specification) ?? entrypoint.specification, filesystem, file ?? entrypoint, options == null ? void 0 : options.onDereference);
18470
+ resolve2((file == null ? void 0 : file.specification) ?? entrypoint.specification, filesystem, file ?? entrypoint, options == null ? void 0 : options.onDereference);
18471
18471
  errors2 = errors2.filter((error2, index, self) => index === self.findIndex((t) => t.message === error2.message && t.code === error2.code));
18472
18472
  return {
18473
18473
  valid: errors2.length === 0,
18474
18474
  errors: errors2,
18475
18475
  schema: (file ?? getEntrypoint(filesystem)).specification
18476
18476
  };
18477
- function resolve2(schema2, resolveFilesystem, resolveFile) {
18477
+ function resolve2(schema2, resolveFilesystem, resolveFile, onResolve) {
18478
18478
  let result;
18479
18479
  Object.entries(schema2 ?? {}).forEach(([_, value]) => {
18480
18480
  if (schema2.$ref !== void 0) {
@@ -18482,6 +18482,7 @@ function resolveReferences(input, options, file, errors2) {
18482
18482
  if (target === void 0) {
18483
18483
  return void 0;
18484
18484
  }
18485
+ onResolve == null ? void 0 : onResolve({ schema: schema2, ref: schema2.$ref });
18485
18486
  delete schema2.$ref;
18486
18487
  if (typeof target === "object") {
18487
18488
  Object.keys(target).forEach((key) => {
@@ -18492,7 +18493,7 @@ function resolveReferences(input, options, file, errors2) {
18492
18493
  }
18493
18494
  }
18494
18495
  if (typeof value === "object" && !isCircular(value)) {
18495
- result = resolve2(value, resolveFilesystem, resolveFile);
18496
+ result = resolve2(value, resolveFilesystem, resolveFile, onResolve);
18496
18497
  }
18497
18498
  });
18498
18499
  return {