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

Rule for enforcing all parameters to be references for AsyncAPI channels #2117

Open
jonaslagoni opened this issue Apr 7, 2022 · 0 comments
Labels
AsyncAPI Issues related to the AsyncAPI ruleset enhancement New feature or request triaged

Comments

@jonaslagoni
Copy link
Collaborator

User story.
As a user, I want to be able to enforce that reusability should be in focus, and therefore all parameters should be references.

Describe the solution you'd like
I want this rule to be part of the built-in ruleset.

Additional context
The way I am currently enforcing it, is through the rule:

rules: 
  ...
  asyncapi-parameters-must-use-references:
    description: Channel parameters must be references
    given: $.channels.[*]
    severity: error
    resolved: false
    then:
      function: schema
      functionOptions:
        schema:
          properties:
            parameters:
              additionalProperties:
                type: object
                required:
                  - $ref
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 triaged
Projects
None yet
Development

No branches or pull requests

2 participants