required-info-version
Overview
This rule belongs to the openapi-v3-standards-validation ruleset and states that:
The Info Object must specify a version number for the current API specification document using the version property.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required property version in Info Object is missing. |
| Code | OPENAPI3STANDARDS_V011 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Info |
| Products Impacted | Developer Experience Portal |
| Tags | openapi3 openapi standards semantic validation version info metadata |
Suggested Fixes
- Add missing
versionproperty in the Info Object. - Make sure that the
versionproperty value is not null or empty. - The value should indicate the version of the OpenAPI document you are currently drafting. If you are unsure, simply set the value to '1.0'.
- This version is not the same as the OpenAPI standard version or your API's version.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#info-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#info-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/