valid-openapi-version
Overview
This rule belongs to the openapi-v3-standards-validation ruleset and states that:
Your OpenAPI specification's root object must specify a valid OpenAPI standard document version using the openapi property. The value must be a valid semantic version number of the OpenAPI standard document in the 3.0.n or 3.1.n range e.g. 3.0.3, 3.1.0, etc.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Version number of the OpenAPI standard document is invalid. |
| Code | OPENAPI3STANDARDS_V002 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | OpenAPI Root Information |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | openapi3 openapi standards semantic validation version |
Suggested Fixes
- Supported versions fall under the 3.0.n or 3.1.n range e.g. 3.0.0, 3.1.0, etc.
- 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
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#versions
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#versions
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/