OpenAPI Rulesets Overview
The rulesets APIMatic uses to validate and lint OpenAPI documents.
APIMatic validates OpenAPI documents (v2.0 and v3.x) against the rulesets below. These include rules defined by the standard as well as additional checks APIMatic enforces for better output.
Validation rulesets
These rulesets make sure your API definition conforms to its format and is technically correct.
| Ruleset | Code prefix | Rules |
|---|---|---|
| OpenAPI v3 Syntax Validation | OPENAPI3SYNTAX_V | 21 |
| OpenAPI v3 Standard Validation | OPENAPI3STANDARDS_V | 155 |
| Swagger v2 Syntax Validation | SWAGGER20SYNTAX_V | 11 |
| Swagger v2 Standard Validation | SWAGGER20STANDARDS_V | 121 |
Linting rulesets
These rulesets are style checks and recommendations. They improve the definition without affecting whether it's valid.
| Ruleset | Code prefix | Rules |
|---|---|---|
| OpenAPI v3 Syntax Linting | OPENAPI3SYNTAX_L | 11 |
| OpenAPI v3 Standards Linting | OPENAPI3STANDARDS_L | 83 |
| OpenAPI v3 APIMatic Linting | OPENAPI3APIMATIC_L | 194 |
| OpenAPI v3 APIMatic Syntax Linting | OPENAPI3APIMATICSYNTAX_L | 24 |
| OpenAPI v3 Linting for APIMatic Code Generation | OPENAPI3CODEGEN_L | 65 |
| OpenAPI v3 Syntax Linting for APIMatic Code Generation | OPENAPI3CODEGENSYNTAX_L | 32 |
| OpenAPI v3 Linting for APIMatic Portal Generation | OPENAPI3DOCSGEN_L | 32 |
| OpenAPI v3 Syntax Linting for APIMatic Portal Generation | OPENAPI3DOCSGENSYNTAX_L | 31 |
| Swagger v2.0 APIMatic Linting | SWAGGER20APIMATIC_L | 3 |
OpenAPI/Swagger 1.x documents aren't covered on these pages.
APIMatic Linting for Portal Generation
APIMatic performs some preliminary linting checks on the user-provided API specification file to ensure that the docs/portal generation produces the desired output.
OpenAPI v3 Syntax Validation
Validation checks performed on provided OpenAPI v3 file to check its conformance to OpenAPI 3.n syntax rules.