FAQ

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

    asyncapi-channel-parameters


    Formats: Severity:

    asyncapi-channel-parameters compares placeholders in a channel address with the channel parameters object. Every {name} in the address must be defined, and every defined parameter should be used.

    Why did this violation appear?

    The channel address and parameter definitions do not match.

    Bad example

    asyncapi: 3.1.0
    channels:
      userEvents:
        address: users/{userId}/{action}
        parameters:
          userId:
            description: User identifier.
          unused:
            description: Not used by the address.
    

    Good example

    asyncapi: 3.1.0
    channels:
      userEvents:
        address: users/{userId}/{action}
        parameters:
          userId:
            description: User identifier.
          action:
            description: Event action.
    

    How do I fix this violation?

    Add missing parameter definitions and remove stale definitions that are not used by the address.