FAQ

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

    openapi-tags-alphabetical


    Formats: Severity:

    JSON Path: $.tags

    If you want to ensure readability for humans, it can make things much easier to read if tags are listed alphabetically.

    Why did this violation appear?

    Global tags are not listed alphabetically for one or more operations.

    Bad example

    tags: 
      - name: "Nuggets"
        description: "Chicken nuggets"
      - name: "Apples"
        description: "Apples are great"
    

    Good Example

    tags: 
      - name: "Apples"
        description: "Apples are great"
      - name: "Nuggets"
        description: "Chicken nuggets"
    

    How do I fix this violation?

    Ensure tags are listed alphabetically in the specification.

    Spectral Equivalent

    The rule is equivalent to openapi-tags-alphabetical