Skip to content

Commit 2a1167f

Browse files
authored
fix: adjust filters and config parsing for websocket protocol (#200)
1 parent addaf27 commit 2a1167f

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

filters/all.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,11 @@ function getConfig(p) {
176176
let protocol = p;
177177
let configName = 'broker';
178178

179-
if (p === 'ws') configName = 'ws';
179+
if (p === 'ws') {
180+
configName = 'ws';
181+
return `config.${configName}`;
182+
}
183+
180184
if (p === 'kafka-secure') protocol = 'kafka';
181185

182186
return `config.${configName}.${protocol}`;

template/config/common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default:
44
version: {{ asyncapi.info().version() }}
55
{% if asyncapi.server(params.server).protocol() === "ws" %}
66
ws:
7-
port: {{ asyncapi.server(params.server).url() | replaceVariablesWithValues(asyncapi.server(params.server).variables()) | port(80) }}
7+
port: {{ asyncapi.server(params.server).url() | replaceServerVariablesWithValues(asyncapi.server(params.server).variables()) | port(80) }}
88
path: /ws
99
topicSeparator: '__'
1010
{% endif %}

0 commit comments

Comments
 (0)