Skip to main content

required-openapi-version

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

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

PropertyValue
EnabledYes
Maximum SeverityBlocking
MessageVersion number of the OpenAPI standard document is missing.
CodeOPENAPI3STANDARDS_V001
TypeValidation
Rule SystemSemantic
Broad CategoryOpenAPI Root Information
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation version

Suggested Fixes

  • Make sure that you have added the openapi property in the root JSON/YAML object.
  • Check that you are not using properties like swagger, swaggerVersionoropenapiVersion` to specify the version.
  • The value of the openapi property must be a valid semantic version number of the OpenAPI standard document in the 3.0.n range e.g. 3.0.0.

For More Information