Linter rulesSwagger 2.0 linter rules

Swagger 2.0 linter rules

Rulesets

Rules

RuleWhat it checksSince
audience-definedThis rule checks whether the intended audience of an API is declared in the x-audience extension of the info object of a Swagger 2.0 document.0.9.0
contact-definedThis rule checks whether complete contact information is present in a Swagger 2.0 document.0.9.0
host-definedThis rule checks whether a Swagger 2.0 document declares the host that serves the API.0.9.0
id-definedThis rule checks whether the info object of a Swagger 2.0 document has an identifier extension (x-id by default), and whether its value has the expected format (a UUID by default).0.9.0
info-definedThis rule checks whether the info object of a Swagger 2.0 document provides a description and a version.0.9.0
license-definedThis rule checks whether the licensing information is present in a Swagger 2.0 document.0.9.0
media-types-definedThis rule checks whether the operations of a Swagger 2.0 document that send or receive a body declare its media types.0.9.0
no-content-response-definedThis rule checks whether 204 No Content responses of a Swagger 2.0 document declare a body.0.9.0
operation-description-definedThis rule checks whether every operation of a Swagger 2.0 document has a meaningful description.0.9.0
operation-id-definedThis rule checks whether every operation of a Swagger 2.0 document has an operation ID.0.9.0
operation-id-uniqueThis rule checks whether the operation IDs of a Swagger 2.0 document are unique.0.9.0
operation-rate-limiting-definedThis rule checks whether the responses of Swagger 2.0 operations declare rate limiting headers.0.9.0
operation-security-definedThis rule checks whether every operation of a Swagger 2.0 document is covered by a security requirement.0.9.0
operation-success-responseThis rule checks whether every operation of a Swagger 2.0 document declares at least one success response.0.9.0
operation-tags-definedThis rule checks whether every operation of a Swagger 2.0 document has at least one tag.0.9.0
parameter-description-definedThis rule checks whether every parameter of a Swagger 2.0 document has a meaningful description.0.9.0
parameter-namingThis rule checks whether parameter names of a Swagger 2.0 document follow a naming convention.0.9.0
parameters-uniqueThis rule checks whether the parameter lists of a Swagger 2.0 document contain duplicates.0.9.0
path-parameters-definedThis rule checks whether every parameter of a path template is declared as a path parameter.0.9.0
path-parameters-on-itemsThis rule checks whether path parameters are declared on path items rather than on individual operations.0.9.0
paths-max-countThis rule checks whether a Swagger 2.0 document defines more paths than a configured maximum.0.9.0
paths-max-depthThis rule checks whether the paths of a Swagger 2.0 document are nested deeper than a configured maximum.0.9.0
paths-sortedThis rule checks whether the paths of a Swagger 2.0 document are sorted.0.9.0
paths-uniqueThis rule checks whether a Swagger 2.0 document defines paths that are equivalent to each other.0.9.0
paths-well-formedThis rule checks whether the paths of a Swagger 2.0 document are well-formed.0.9.0
safe-markdownThis rule ensures that the GFM descriptions of a Swagger 2.0 document do not contain unsafe constructs like script elements or eval() calls.0.9.0
schema-constraintsThis rule ensures that typed objects of a Swagger 2.0 document define constraints restricting the size of the underlying data.0.9.0
schema-datetime-suffixThis rule ensures that the names of date and date-time properties end with a common suffix.0.9.0
schema-enum-namingThis rule ensures that the string values of enum lists adhere to a predefined naming convention.0.9.0
schema-enum-no-duplicatesThis rule ensures that enum lists do not contain duplicate values.0.9.0
schema-enum-typesThis rule ensures that all values of an enum list match the declared type.0.9.0
schema-example-definedThis rule ensures that the schemas of a Swagger 2.0 document provide examples.0.9.0
schema-format-definedThis rule ensures that numeric objects declare the size of their values with a format.0.9.0
schema-format-deprecatedThis rule reports the formats which the OpenAPI format registry marks as deprecated from OpenAPI 3.1, and names what replaces them.0.10.0
schema-format-type-mismatchThis rule ensures that the format of an object is one that applies to its type.0.9.0
schema-format-unknownThis rule reports a format of a Swagger 2.0 document which is neither in the OpenAPI format registry nor declared in openapi.custom_formats of the configuration file.0.10.0
schema-no-additional-propertiesThis rule ensures that object schemas do not accept arbitrary additional properties.0.9.0
schema-property-namingThis rule ensures that the names of schema properties adhere to a predefined naming convention.0.9.0
schema-required-properties-definedThis rule checks that every name listed in required is declared in properties.0.9.0
schemes-secureThis rule checks whether a Swagger 2.0 document serves its API over secure transfer protocols only, and whether its host is written in lower case.0.9.0
spell-checkThis rule checks the spelling of the texts of a Swagger 2.0 document written for humans: titles, summaries and descriptions.0.9.0
standard-media-typesThis rule checks whether a Swagger 2.0 document uses only well-known media types.0.9.0
swagger-validationThis rule reports violations of the Swagger 2.0 specification that span several objects, and therefore cannot be detected while a single object is read.0.9.0
tag-description-definedThis rule checks whether each tag declared in the root tags array of a Swagger 2.0 document has a meaningful description.0.9.0
tags-sortedThis rule checks whether the tags in the root tags array of a Swagger 2.0 document are sorted by name.0.9.0
tags-uniqueThis rule checks whether the tags in the root tags array of a Swagger 2.0 document have unique names, comparing names case-insensitively.0.9.0
unused-request-bodyThis rule checks whether GET and HEAD operations of a Swagger 2.0 document declare a request body.0.9.0
unused-shared-componentThis rule checks whether every shared object of a Swagger 2.0 document is actually used.0.9.0