Skip to content

Commit

Permalink
fix: refactor asyncapiDocument.server() to `asyncapiDocument.server…
Browse files Browse the repository at this point in the history
…s().get()` to fix `conditionalFiles` (asyncapi#1207)
  • Loading branch information
ibishal authored May 6, 2024
1 parent 5804052 commit b5ed788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
...{
Expand Down

0 comments on commit b5ed788

Please sign in to comment.