AsyncAPI Best Practices
asyncapi-channel-no-trailing-slash
general > asyncapi-channel-no-trailing-slash
Guidance
Keep trailing slashes off of channel names, as it can cause some confusion. Most messaging protocols will treat
example/foo and example/foo/ as different things. Keep in mind that tooling may replace slashes (/) with
protocol-specific notation (e.g.: . for AMQP); therefore, a trailing slash may result in an invalid channel name
in some protocols.
Message
Channel "{{apiContract.path}}" should not end with a slash.
Examples
valid
channels:
/endpoint:
subscribe:
operationId: subs-ops
message:
x-pageSize: 5
invalid
channels:
/endpoint/:
subscribe:
operationId: subs-ops
message:
x-pageSize: 5
Applies to EndPoint