openapi-tags
Global Tags define meta-data that can then be used by Operations and Paths Rules
Why did this violation appear?
Global tags have not been defined, or they are not an array
as required by the schema.
Bad examples
No tags
defined
openapi: 3.0.1
info:
description: "This is a specification"
paths:
/some/path:
...
Tags are not an array
openapi: 3.0.1
tags:
name: "Tag"
description: "I am a description"
info:
description: "This is a specification"
paths:
/some/path:
...
Good Example
openapi: 3.0.1
tags:
- name: "SomeTag"
description: "I am a tag description."
- name: "AnotherTag"
description: "I am another tag description."
info:
description: "This is a specification"
paths:
/some/path:
...
How do I fix this violation?
Ensure global tags
have been defined, and ensure they are an array
.
Spectral Equivalent
The rule is equivalent to openapi-tags