AsyncAPI Best Practices
asyncapi-server-no-trailing-slash
general > asyncapi-server-no-trailing-slash
Guidance
Some tooling forgets to strip trailing slashes off when it's joining the servers.url with channels, and you can
get awkward URLs like mqtt://example.com/broker//pets. Best to just strip them off yourself.
Message
The server URL "{{core.urlTemplate}}" should not have a trailing slash.
Examples
valid
asyncapi: 2.0.0
servers:
production:
url: "amqp://somelegitserver.com"
protocol: amqp
description: Production server
channels: {}
invalid
asyncapi: 2.0.0
servers:
production:
url: "amqp://somelegitserver.com/"
protocol: amqp
description: Production server
channels: {}
Applies to Server