From beebe4bf3d6811539f87be73148913762b3098b0 Mon Sep 17 00:00:00 2001 From: Bishal Date: Mon, 6 May 2024 13:23:18 +0000 Subject: [PATCH 1/2] removed the error --- lib/generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generator.js b/lib/generator.js index 631012f32..825dedcd5 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -879,7 +879,7 @@ class Generator { if (!shouldOverwriteFile) return; if (this.templateConfig.conditionalFiles && this.templateConfig.conditionalFiles[relativeSourceFile]) { - const server = this.templateParams.server && asyncapiDocument.server(this.templateParams.server); + const server = this.templateParams.server && asyncapiDocument.servers().get(this.templateParams.server) const source = jmespath.search({ ...asyncapiDocument.json(), ...{ From 066d46df2499883e8e51ad381e3b3adc3f1b476b Mon Sep 17 00:00:00 2001 From: Bishal Date: Mon, 6 May 2024 14:22:51 +0000 Subject: [PATCH 2/2] semi-colon === ; linting fails here too ;( --- lib/generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generator.js b/lib/generator.js index 825dedcd5..0e66e6f8f 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -879,7 +879,7 @@ class Generator { if (!shouldOverwriteFile) return; if (this.templateConfig.conditionalFiles && this.templateConfig.conditionalFiles[relativeSourceFile]) { - const server = this.templateParams.server && asyncapiDocument.servers().get(this.templateParams.server) + const server = this.templateParams.server && asyncapiDocument.servers().get(this.templateParams.server); const source = jmespath.search({ ...asyncapiDocument.json(), ...{