Skip to content

Add a rule to validate servers in the channel #2124

@magicmatatjahu

Description

@magicmatatjahu

User story.
As a user I want to know if the servers defined in the channels.*.servers array exist in the servers object.

Is your feature request related to a problem?
The following AsyncAPI document is invalid and Spectral should throw errors:

asyncapi: "2.0.0"
info:
  title: Awesome API
  description: A very well defined API
  version: "1.0"
servers:
  production:
    url: "stoplight.io"
    protocol: "https"
channels:
  hello:
    servers:
      - development

Additional context
Part of #2100

Metadata

Metadata

Assignees

No one assigned

    Labels

    AsyncAPIIssues related to the AsyncAPI rulesetenhancementNew feature or requestreleased

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions