Define & Validate APIsValidation RulesetsOpenAPI Rulesets
Swagger v2.0 APIMatic Linting
Linting checks performed by APIMatic on provided Swagger v2.0 file to check its conformance to recommended practices for better API consumption.
| Property | Value |
|---|---|
| Ruleset ID | swagger-v2-apimatic-linting |
| Code prefix | SWAGGER20APIMATIC_L |
| Type | Linting |
| Default severity | Warning |
| Rule system | Semantic |
| Rules | 3 |
Security
| Code | Rule | Severity | What it checks |
|---|---|---|---|
SWAGGER20APIMATIC_L001 | security-options-meta-count-matches-security-items-count | Warning | You can extend the security information you apply globally or at operation level by using the x-security-options-meta extension. It can help you provide more details for each of the security options available. However, the number of items inside the x-security-options-meta extension must match the number of items inside the security list. |
Operations
| Code | Rule | Severity | What it checks |
|---|---|---|---|
SWAGGER20APIMATIC_L100 | get-operation-cannot-have-body-or-form-parameters | Warning | A GET operation must not define a parameter with location in set as body or formData in the parameters list. This is because such methods do not expect a request body and, therefore, all related information will be ignored automatically during import/transformations in APIMatic. |
SWAGGER20APIMATIC_L101 | supported-response-code | Warning | If multiple responses are disabled via import settings provided in the APIMatic Metadata file, only response definitions in responses belonging to status code ranges 200-208 and 400-599 will be imported. Those outside the supported range will be ignored automatically during import/transformations in APIMatic. |
Learn more
OpenAPI v3 Syntax Linting for APIMatic Portal Generation
Syntax linting checks performed by APIMatic on provided OpenAPI v3 file to check its conformance to recommended practices for a more user-friendly API documentation.
API Blueprint Rulesets
The ruleset APIMatic uses to validate API Blueprint documents.