This rule checks whether tags defined in an OpenAPI schema are sorted alphabetically according to their names.
Keeping tags sorted alphabetically improves the readability of the API’s schema.
The tags-sorted
rule checks all tags defined by an OpenAPI schema and
raises an issue if the tags are not sorted.
None.
Good.
tags:
- name: Admin
- name: Product
- name: User
Bad.
tags:
- name: User
- name: Admin
- name: Product
We recommend to always enable this rule.
This rule is compatible with all OpenAPI 3.x versions.