@scalar/fastify-api-reference 1.25.119 → 1.25.121

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
@@ -18713,7 +18713,6 @@ function leven(first, second) {
18713
18713
  return result;
18714
18714
  }
18715
18715
  class BaseValidationError {
18716
- // eslint-disable-next-line default-param-last
18717
18716
  constructor(options = { isIdentifierLocation: false }, { data, schema: schema2, jsonAst, jsonRaw }) {
18718
18717
  this.options = options;
18719
18718
  this.data = data;
@@ -18728,9 +18727,7 @@ class BaseValidationError {
18728
18727
  return typeof this.options.instancePath !== "undefined" ? this.options.instancePath : this.options.dataPath;
18729
18728
  }
18730
18729
  getError() {
18731
- throw new Error(
18732
- `Implement the 'getError' method inside ${this.constructor.name}!`
18733
- );
18730
+ throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`);
18734
18731
  }
18735
18732
  }
18736
18733
  class EnumValidationError extends BaseValidationError {
@@ -19823,6 +19820,7 @@ const fastifyApiReference = fp(
19823
19820
  // @ts-ignore We don’t know whether @fastify/swagger is loaded.
19824
19821
  schema: schemaToHideRoute,
19825
19822
  ...hooks,
19823
+ ...options.logLevel && { logLevel: options.logLevel },
19826
19824
  async handler(_, reply) {
19827
19825
  const spec = getLoadedSpecIfAvailable();
19828
19826
  const filename = await getSpecFilenameSlug(spec);
@@ -19837,6 +19835,7 @@ const fastifyApiReference = fp(
19837
19835
  // @ts-ignore We don’t know whether @fastify/swagger is loaded.
19838
19836
  schema: schemaToHideRoute,
19839
19837
  ...hooks,
19838
+ ...options.logLevel && { logLevel: options.logLevel },
19840
19839
  async handler(_, reply) {
19841
19840
  const spec = getLoadedSpecIfAvailable();
19842
19841
  const filename = await getSpecFilenameSlug(spec);
@@ -19852,6 +19851,7 @@ const fastifyApiReference = fp(
19852
19851
  // @ts-ignore We don't know whether @fastify/swagger is loaded.
19853
19852
  schema: schemaToHideRoute,
19854
19853
  ...hooks,
19854
+ ...options.logLevel && { logLevel: options.logLevel },
19855
19855
  handler(_, reply) {
19856
19856
  return reply.redirect(getRoutePrefix(options.routePrefix) + "/", 302);
19857
19857
  }
@@ -19864,6 +19864,7 @@ const fastifyApiReference = fp(
19864
19864
  // @ts-ignore We don’t know whether @fastify/swagger is loaded.
19865
19865
  schema: schemaToHideRoute,
19866
19866
  ...hooks,
19867
+ ...options.logLevel && { logLevel: options.logLevel },
19867
19868
  handler(_, reply) {
19868
19869
  const currentUrl = new URL(_.url, `${_.protocol}://${_.hostname}`);
19869
19870
  if (!currentUrl.pathname.endsWith("/")) {
@@ -19896,6 +19897,7 @@ const fastifyApiReference = fp(
19896
19897
  // @ts-ignore We don’t know whether @fastify/swagger is loaded.
19897
19898
  schema: schemaToHideRoute,
19898
19899
  ...hooks,
19900
+ ...options.logLevel && { logLevel: options.logLevel },
19899
19901
  handler(_, reply) {
19900
19902
  return reply.header("Content-Type", "application/javascript; charset=utf-8").send(fileContent);
19901
19903
  }