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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Blocking |
Message | Version number of the Swagger standard document is missing. |
Code | SWAGGER20STANDARDS_V001 |
Type | Validation |
Rule System | Semantic |
Broad Category | Swagger Root Information |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | swagger2 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.