Skip to main content

valid-swagger-version

Overview

This rule belongs to the swagger-v2-standards-validation ruleset and states that:

Your Swagger specification's root object must specify a valid Swagger standard document version using the 'swagger' property. The value must be a valid semantic version number of the Swagger standard document, i.e. it must be 2.0.

PropertyValue
EnabledYes
Maximum SeverityError
MessageVersion number of the Swagger standard document is invalid.
CodeSWAGGER20STANDARDS_V002
TypeValidation
Rule SystemSemantic
Broad CategorySwagger Root Information
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation version

Suggested Fixes

  • The only supported version is 2.0.
  • This version is not to be confused with the API version or the API specification document version which is specified using the info.version property.

For More Information