valid-swagger-version
Overview
This rule belongs to the swagger-v1-validation ruleset and states that:
Your Swagger specification's root object must specify a valid Swagger standard document version using the 'swaggerVersion' property. The value must be set to one of the following: 1.0, 1.1, 1.2.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Blocking |
| Message | Specification version number of the Swagger standard document is invalid. |
| Code | SWAGGER1_V002 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Basic Structure |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | swagger1 swagger semantic validation version |
Suggested Fixes
- Ensure that the value of
swaggerVersionproperty is not null or empty. - Ensure that the value of
swaggerVersionproperty is set either as1.0,1.1or1.2. - This version is not to be confused with the API version or the API specification document version which is specified using the
apiVersionproperty.