diff --git a/lib/Parser.v2.js b/lib/Parser.v2.js index 5da1ceeb..377ae323 100644 --- a/lib/Parser.v2.js +++ b/lib/Parser.v2.js @@ -140,12 +140,10 @@ export class ParserV2 extends ParserBase { } case "basePath": this.config.prefix = spec[item]; - // the missing break is on purpose ! - // eslint-disable-next-line no-fallthrough + break; case "securityDefinitions": this.config.securitySchemes = spec[item]; - // the missing break is on purpose ! - // eslint-disable-next-line no-fallthrough + break; default: this.config.generic[item] = spec[item]; } diff --git a/lib/Parser.v3.js b/lib/Parser.v3.js index da64d2fe..e30bcab1 100644 --- a/lib/Parser.v3.js +++ b/lib/Parser.v3.js @@ -139,8 +139,8 @@ export class ParserV3 extends ParserBase { case "components": if (spec.components.securitySchemes) { this.config.securitySchemes = spec.components.securitySchemes; - } // the missing break is on purpose ! - // eslint-disable-next-line no-fallthrough + } + break; default: this.config.generic[item] = spec[item]; } diff --git a/lib/templates/js/test-plugin.js b/lib/templates/js/test-plugin.js index 5af85910..0b9d650f 100644 --- a/lib/templates/js/test-plugin.js +++ b/lib/templates/js/test-plugin.js @@ -32,7 +32,7 @@ test("testing ${route.operationId}", (t) => { fastify.inject( { method: "${route.method}", - url: "${data.generic.basePath ? data.generic.basePath : ""}${route.url}", + url: "${data.prefix ? data.prefix : ""}${route.url}", payload: undefined,${ route.schema.body ? " //insert body data here!!" : "" } diff --git a/lib/templates/standaloneJS/test-plugin.js b/lib/templates/standaloneJS/test-plugin.js index 21e94fb2..a6f62873 100644 --- a/lib/templates/standaloneJS/test-plugin.js +++ b/lib/templates/standaloneJS/test-plugin.js @@ -27,7 +27,7 @@ test("testing ${route.operationId}", (t) => { fastify.inject( { method: "${route.method}", - url: "${data.generic.basePath ? data.generic.basePath : ""}${route.url}", + url: "${data.prefix ? data.prefix : ""}${route.url}", payload: undefined,${ route.schema.body ? " //insert body data here!!" : "" }