Skip to main content

required-swagger-version

Overview

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

The Swagger specification's root object must specify the 'swagger' property to indicate the version of the Swagger standard document you are using to define your specification.

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

Suggested Fixes

  • Make sure that you have added the 'swagger' property in the root JSON/YAML object.
  • Check that you are not using properties like 'openapi', 'openapiVersion' or 'swaggerVersion' to specify the version.

For More Information