Skip to content

Commit

Permalink
fix: adjust filters and config parsing for websocket protocol (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Mar 29, 2023
1 parent addaf27 commit 2a1167f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion filters/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ function getConfig(p) {
let protocol = p;
let configName = 'broker';

if (p === 'ws') configName = 'ws';
if (p === 'ws') {
configName = 'ws';
return `config.${configName}`;
}

if (p === 'kafka-secure') protocol = 'kafka';

return `config.${configName}.${protocol}`;
Expand Down
2 changes: 1 addition & 1 deletion template/config/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default:
version: {{ asyncapi.info().version() }}
{% if asyncapi.server(params.server).protocol() === "ws" %}
ws:
port: {{ asyncapi.server(params.server).url() | replaceVariablesWithValues(asyncapi.server(params.server).variables()) | port(80) }}
port: {{ asyncapi.server(params.server).url() | replaceServerVariablesWithValues(asyncapi.server(params.server).variables()) | port(80) }}
path: /ws
topicSeparator: '__'
{% endif %}
Expand Down

0 comments on commit 2a1167f

Please sign in to comment.