Linter rulesOpenAPItags-unique

tags-unique

Since 0.0.1 · fixed by --fix

This rule checks for schemas that define multiple tags with the same name, considering tag names as case-insensitive.

Rule Details

Duplicate tag names can lead to confusion and misinterpretation of the API’s structure.

The tags-unique rule is designed to ensure that all tags defined in a schema have unique names. Names are considered case-insensitive.

Configuration

None.

Examples

Good.

tags:
  - name: User
  - name: Product

Bad.

tags:
  - name: user
    description: First tag
  - name: User
    description: Is this another tag, or a typo ?

When Not to Use It

We recommend to always enable this rule.

Automatic fixes

When invoked with --fix, this rule removes case-insensitive duplicates with identical metadata, and removes empty duplicates in favor of an informative definition. Conflicting descriptions or external documentation remain manual.

Compatibility

This rule is compatible with all OpenAPI 3.x versions.