operation-tags-defined
Since 0.0.1 · In the rulesets: Recommended at warning, Strict at warning, All at error
This rule checks that every operation has at least one tag.
Rule details
Tags group the operations of an API: documentation renders one section per tag, and generated clients put the operations of a tag in one class. An operation without a tag lands in a group of its own, named by each tool.
The rule reports Operation has no tags defined when tags is missing or empty. Turn it off for
an API that does not use tags.
Examples
Good. The operation belongs to the Users group.
paths:
/users:
get:
tags:
- Users
responses:
"200":
description: A list of users.
tags:
- name: Users
Bad. The operation belongs to no group.
paths:
/users:
get:
responses:
"200":
description: A list of users.
tags:
- name: Users
Turn it off or change its severity
In apigenie.yaml, off turns the rule off and warning or error sets its severity; a rule with options takes the severity and the options as a pair, [warning, options]. lint.rules has the details.
commands:
lint:
rules:
operation-tags-defined: off