Define & Validate APIsValidation Rulesets
I/O Docs Rulesets
The ruleset APIMatic uses to validate I/O Docs documents.
APIMatic validates I/O Docs documents against the ruleset below. These include rules defined by the standard as well as additional checks APIMatic enforces for better output.
I-O Docs Validation
Validation checks performed on a I/O Docs Document file.
| Property | Value |
|---|---|
| Ruleset ID | io-docs-validation |
| Code prefix | IODOCS_V |
| Type | Validation |
| Default severity | Error |
| Rule system | Semantic |
| Rules | 4 |
Basic Structure
| Code | Rule | Severity | What it checks |
|---|---|---|---|
IODOCS_V001 | valid-io-docs-syntax | Blocking | An I/O Docs file must not contain any syntax/semantic issues and use only valid JSON. Each property in the file must have a type as defined in the standard. |
API Metadata
| Code | Rule | Severity | What it checks |
|---|---|---|---|
IODOCS_V050 | required-name | Error | The root object of an I/O Docs file must specify a short user-friendly title of the API using the name property. If a name is not found, a default value for it will be assigned automatically during import/transformations in APIMatic. |
Methods
| Code | Rule | Severity | What it checks |
|---|---|---|---|
IODOCS_V100 | required-method-parameter-name | Error | A parameter defined in the parameters section must specify the name for the parameter using the name property (for legacy I/O Docs versions) or the title property (for I/O Docs Mashery verison). The name is API/service defined and must not be null or empty. |
IODOCS_V101 | no-request-body-parameter-for-get-http-method | Warning | If a method in an I/O Docs document has httpMethod set as GET, it must not define a request section as such methods do not expect a body and, therefore, all related information will be ignored automatically during import/transformations in APIMatic. |