Ensures that your API document conforms to structural requirements of OpenAPI specification, AsyncAPI specification, Arazzo specification, or Overlay specification.
| OAS | Compatibility |
|---|---|
| 2.0 | ✅ |
| 3.0 | ✅ |
| 3.1 | ✅ |
| 3.2 | ✅ |
| AsyncAPI | Compatibility |
|---|---|
| 2.6 | ✅ |
| 3.0 | ✅ |
| Arazzo | Compatibility |
|---|---|
| 1.x | ✅ |
| Overlay | Compatibility |
|---|---|
| 1.x | ✅ |
The default setting for this rule (in the spec, recommended, and minimal configuration) is error.
This is an essential rule that should not be turned off except in rare and special cases.
It's important to conform to the specification so that tools work with your API document. Doing so makes writing and maintenance of API descriptions easier.
| Option | Type | Description |
|---|---|---|
| severity | string | Possible values: off, warn, error. Default error. |
An example configuration:
rules:
struct: errorGiven this configuration:
rules:
struct: errorExample of an incorrect struct:
openapi: 3.0.0
info:
version: 1.0.0
paths: {}Example of a correct struct:
openapi: 3.0.0
info:
title: Ultra API
version: 1.0.0
paths: {}