Skip to content

Add rule to check uniqueness of operationId #2102

@magicmatatjahu

Description

@magicmatatjahu

User story.
As a user, I want to know if the operations defined in my AsyncAPI document have a unique operationId.

Describe the solution you'd like
The following AsyncAPI document is invalid and Spectral should throw errors due to non-uniqueness of operationId.

asyncapi: '2.3.0'
...

channels:
  someChannel:
    publish:
      operationId: someId
      ...
    subscribe:
      operationId: someId
      ...

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