feat(linter): Finalize OpenAPI description validation mechanism for structured objects (T422600)
linter: Implement remaining rules necessary to lint structured objects that can be added to the OAD
I checked that rules are consistent with OpenAPI Specification v3.0.0.
-
Validate that if any operation has tags defined, the global tags field is also defined (severity: warn) - example (a version of this rule is already implemented in
wikimedia-operation-tags-definedand the built-inoperation-tag-defined)- Per discussion with Kamil and Alex, verified that these existing rules implemented this feature.
-
Validate that the
info.licensefield is defined (severity: warn) - example - Validate that every server variable has a description (severity: info) - example
-
Validate that every external documentation object has a description. External documentation objects are defined in the
externalDocsfield throughout the OAD. (severity: warn) - example #1, example #2, example #3 -
Validate every link object according to the rules below. Link objects are defined in the
linksfield in the components and response objects:-
Validate that the link has either
operationReforoperationId- but not both - defined (severity: error) - example #1, example #2 - Validate that the link has a description (severity: warn) - example
-
Validate that the link has either
-
Validate every tag object according to the rules below. Tag objects can only be defined in the top-level
tagsfield -
Validate that every security scheme has a description. Security schemes can only be defined under the top-level
securitySchemesfield. (severity: info) - example
As a side note, I noticed a spelling error to nitpick on the README.
Closes T422600