The ruleset APIMatic uses to validate Insomnia documents.
APIMatic validates Insomnia export documents against the ruleset below. These include rules defined by the standard as well as additional checks APIMatic enforces for better output.
The provided Insomnia file must not contain any syntax/semantic issues and use only valid JSON/YAML. Each property in the file must have a type as defined in the standard.
If a url defined in an Insomnia request resource contains a variable using curly braces {{name}}, a corresponding value for the variable must be available in each environment resource's data. The variable name used in the URL must match exactly with the name of the variable in the environment resource data and the value provided this way must be non-empty. If an environment entry does not exist or the value is empty, a dummy value will be assumed for the variable automatically during import/transformations in APIMatic.
The url defined in an Insomnia request resource must be non-empty and an absolute path. Relative paths are not allowed. This is essential for determining the base URLs of one or more servers that serve the current API.
INSOMNIA_V201
no-body-in-request-with-get-method
Warning
A request resource with method GET must not define a body (i.e. the request payload). This is because such methods do not expect a body and, therefore, all related information will be ignored automatically during import/transformations in APIMatic.
If the request authentication type is oauth2 and grantType is set as implicit or authorization_code, then the authentication object must specify a non-empty authorization URL to be used for this grant type, using the authorizationUrl property. If the URL is not provided, a dummy value will be assigned automatically during import/transformations in APIMatic.
INSOMNIA_V401
required-oauth2-access-token-url
Error
If the request authentication type is oauth2 and grantType is set as client_credentials, password or authorization_code, then the authentication object must specify a non-empty access token URL to be used for this grant type, using the accessTokenUrl property. If the URL is not provided, a dummy value will be assigned automatically during import/transformations in APIMatic.