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 a rule to validate security in the operations #2162

Closed
magicmatatjahu opened this issue May 19, 2022 · 1 comment · Fixed by #2122
Closed

Add a rule to validate security in the operations #2162

magicmatatjahu opened this issue May 19, 2022 · 1 comment · Fixed by #2122
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 operation has the correct security defined (that given security key has reference to the schemes defined in the components.securitySchemes).

Is your feature request related to a problem?
The following AsyncAPI document is invalid and Spectral should throw errors due to not defined security schemes inside one of operation:

asyncapi: '2.0.0',
channels:
  'user/signup':
    publish:
      security:
        - not_defined: []
components:
  securitySchemes:
    petstore_auth:
      ...

Additional context
Part of #2100

@stoplight-bot
Copy link
Collaborator

🎉 This issue has been resolved in version @stoplight/spectral-rulesets-v1.11.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