info-defined

info-defined

This rule checks whether the info object is present in an OpenAPI schema and if it contains the summary, description, and version fields.

Rule Details

The rationale behind this rule is to enforce the inclusion of basic information in the API specification. This helps users of the API to understand its purpose, functionality, and version.

The info-defined rule is designed to ensure that the #/info object is defined in an OpenAPI schema and that it contains the summary, description, and version fields. These fields are crucial as they provide basic information about the API.

Configuration

None.

Examples

This rule should be used whenever an OpenAPI schema is being defined. For instance:

When Not to Use It

We recommend to always include these fields in OpenAPI schemas.

Compatibility

This rule is compatible with all OpenAPI 3.x version.

← Back to Index