FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • ✨ New! Try the OpenAPI Doctor ✨ The OpenAPI Doctor
    Recommended

    asyncapi-3-channel-servers


    Formats: Severity:

    asyncapi-3-channel-servers checks that channel servers entries point to named root-level servers. Channels should not point at missing servers or component server definitions.

    Why did this violation appear?

    A channel server reference points somewhere other than #/servers/<name> or names a root server that does not exist.

    Bad example

    asyncapi: 3.1.0
    servers:
      production:
        host: events.example.com
        protocol: mqtt
    channels:
      userEvents:
        address: users
        servers:
          - $ref: '#/components/servers/production'
    

    Good example

    asyncapi: 3.1.0
    servers:
      production:
        host: events.example.com
        protocol: mqtt
    channels:
      userEvents:
        address: users
        servers:
          - $ref: '#/servers/production'
    

    How do I fix this violation?

    Reference root servers with #/servers/<serverName> and make sure each named server exists.