FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • ✨ New! Try the OpenAPI Doctor ✨ The OpenAPI Doctor
    Recommended

    operation-tags


    Formats: Severity:

    Operations make use of Tags to group operations together. Tags are really important for documentation and exploring tools.

    This rule checks that an operation has defined tags, and that at least one exists. This rule is a more generic and more useful version of the operation-singular-tag.

    Why did this violation appear?

    One or more operation in the specification does not have a tags property that contains at least a single tag.

    Bad example

    No tags defined

    paths:
      /chicken/nugget:
        post:
          description: "this is an operation about chicken nuggets"
          responses:
          ...
    

    Good Example

    paths:
      /chicken/nugget:
        post:
          tags:
           - ChickenNuggets
          description: "this is an operation about chicken nuggets"
          responses:
       ...
    

    How do I fix this violation?

    Ensure every Operation has tags defined, and ensure they are an strting array with at least a single Tag added.

    Spectral Equivalent

    The rule is equivalent to operation-tags