Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rule to check uniqueness of operationId #2102

Closed
Tracked by #2100
magicmatatjahu opened this issue Mar 22, 2022 · 1 comment · Fixed by #2121
Closed
Tracked by #2100

Add rule to check uniqueness of operationId #2102

magicmatatjahu opened this issue Mar 22, 2022 · 1 comment · Fixed by #2121
Labels
AsyncAPI Issues related to the AsyncAPI ruleset enhancement New feature or request released

Comments

@magicmatatjahu
Copy link
Contributor

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

@stoplight-bot
Copy link
Collaborator

🎉 This issue has been resolved in version @stoplight/spectral-rulesets-v1.9.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AsyncAPI Issues related to the AsyncAPI ruleset enhancement New feature or request released
Projects
None yet
2 participants