@scalar/fastify-api-reference 1.25.116 → 1.25.118
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 +13 -0
- package/dist/fastifyApiReference.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +8 -7
- package/dist/js/standalone.js +8700 -8579
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -18524,7 +18524,7 @@ function resolveUri(uri2, options, file, filesystem, resolve2, errors2) {
|
|
|
18524
18524
|
code: "INVALID_REFERENCE",
|
|
18525
18525
|
message: ERRORS.INVALID_REFERENCE.replace("%s", uri2)
|
|
18526
18526
|
});
|
|
18527
|
-
return;
|
|
18527
|
+
return void 0;
|
|
18528
18528
|
}
|
|
18529
18529
|
const [prefix, path2] = uri2.split("#", 2);
|
|
18530
18530
|
const isDifferentFile = prefix !== file.filename;
|
|
@@ -18540,7 +18540,7 @@ function resolveUri(uri2, options, file, filesystem, resolve2, errors2) {
|
|
|
18540
18540
|
code: "EXTERNAL_REFERENCE_NOT_FOUND",
|
|
18541
18541
|
message: ERRORS.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s", prefix)
|
|
18542
18542
|
});
|
|
18543
|
-
return;
|
|
18543
|
+
return void 0;
|
|
18544
18544
|
}
|
|
18545
18545
|
if (path2 === void 0) {
|
|
18546
18546
|
return externalReference.specification;
|
|
@@ -18561,6 +18561,7 @@ function resolveUri(uri2, options, file, filesystem, resolve2, errors2) {
|
|
|
18561
18561
|
message: ERRORS.INVALID_REFERENCE.replace("%s", uri2)
|
|
18562
18562
|
});
|
|
18563
18563
|
}
|
|
18564
|
+
return void 0;
|
|
18564
18565
|
}
|
|
18565
18566
|
const eq = (x) => (y) => x === y;
|
|
18566
18567
|
const not = (fn) => (x) => !fn(x);
|
|
@@ -19150,7 +19151,7 @@ function upgradeFromThreeToThreeOne(originalSpecification) {
|
|
|
19150
19151
|
}
|
|
19151
19152
|
specification = traverse(specification, (schema2) => {
|
|
19152
19153
|
if (schema2.type !== "undefined" && schema2.nullable === true) {
|
|
19153
|
-
schema2.type = ["null"
|
|
19154
|
+
schema2.type = [schema2.type, "null"];
|
|
19154
19155
|
delete schema2.nullable;
|
|
19155
19156
|
}
|
|
19156
19157
|
return schema2;
|
|
@@ -19626,6 +19627,7 @@ const fetchUrls = (customConfiguration) => {
|
|
|
19626
19627
|
return await response.text();
|
|
19627
19628
|
} catch (error2) {
|
|
19628
19629
|
console.error("[fetchUrls]", error2.message, `(${value})`);
|
|
19630
|
+
return void 0;
|
|
19629
19631
|
}
|
|
19630
19632
|
}
|
|
19631
19633
|
};
|
|
@@ -19793,9 +19795,8 @@ const fastifyApiReference = fp(
|
|
|
19793
19795
|
if (fastify.hasPlugin("@fastify/swagger")) {
|
|
19794
19796
|
return {
|
|
19795
19797
|
type: "swagger",
|
|
19796
|
-
|
|
19797
|
-
|
|
19798
|
-
}
|
|
19798
|
+
// @ts-ignore We know that @fastify/swagger is loaded.
|
|
19799
|
+
get: () => fastify.swagger()
|
|
19799
19800
|
};
|
|
19800
19801
|
}
|
|
19801
19802
|
return void 0;
|
|
@@ -19814,7 +19815,7 @@ const fastifyApiReference = fp(
|
|
|
19814
19815
|
"preHandler"
|
|
19815
19816
|
];
|
|
19816
19817
|
for (const hook of additionalHooks) {
|
|
19817
|
-
hooks[hook] = options.hooks[hook];
|
|
19818
|
+
if (options.hooks[hook]) hooks[hook] = options.hooks[hook];
|
|
19818
19819
|
}
|
|
19819
19820
|
}
|
|
19820
19821
|
const getLoadedSpecIfAvailable = () => {
|