FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • Recommended

    component-description


    Formats: Severity:

    OpenAPI 3+ Components have description properties. This rule checks that for every component there is a description set.

    Why did this violation appear?

    One or more description elements in the spec are missing from a component (v3+)

    Bad example

    components:
      schemas:
        ChickenNugget:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
    

    Good example

    components:
      schemas:
        ChickenNugget:
          type: object
          description: "This represents a chicken nugget, used for all kinds of nugget fun."
          properties:
            id:
              type: integer
            name:
              type: string
    

    How do I fix this violation?

    Make sure every description in all references in components are unique and meaningful. Descriptions really are the most important part of a spec.

    Spectral Equivalent

    There is no spectral equivalent. This rule is unique to vacuum.