From b5ed78807832a9bb5d6ecbbc8c8023ba0775e4dc Mon Sep 17 00:00:00 2001 From: Bishal <153212508+ibishal@users.noreply.github.com> Date: Tue, 7 May 2024 01:28:42 +0530 Subject: [PATCH] fix: refactor `asyncapiDocument.server()` to `asyncapiDocument.servers().get()` to fix `conditionalFiles` (#1207) --- lib/generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generator.js b/lib/generator.js index 631012f32..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.server(this.templateParams.server); + const server = this.templateParams.server && asyncapiDocument.servers().get(this.templateParams.server); const source = jmespath.search({ ...asyncapiDocument.json(), ...{