required-api-info
Overview
This rule belongs to the openapi-v3-standards-validation ruleset and states that:
The OpenAPI root object must specify metadata about the API using the info property.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required property info in root OpenAPI object is missing. |
| Code | OPENAPI3STANDARDS_V003 |
| 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 info metadata |
Suggested Fixes
- Add missing
infoproperty in the root object i.e. in the top level properties of the document. - Make sure that the
infoproperty is a valid object and not set as null.
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.0.3.md#openapi-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/