The ruleset APIMatic uses to validate HAR documents.
APIMatic validates HAR documents against the ruleset below. These include rules defined by the standard as well as additional checks APIMatic enforces for better output.
The provided HAR 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.
The url defined in a HAR entry request must be non-empty and an absolute path. This is essential for determining the base URLs of one or more servers that serve the current API. If a base URL cannot be determined, a default dummy value for base URL will be assumed automatically during import/transformations in APIMatic.
HAR_V101
no-post-data-for-get-request
Warning
An entry request with method GET must not define a postData (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.
When a request header is defined in the headers list, a non-empty non-null name must be specified for it using the name property.
HAR_V301
required-request-query-parameter-name
Error
When a request query string is defined, a non-empty non-null name must be specified for each query parameter using the name property. If a name is not found, the parameter definition will be ignored automatically during import/transformations in APIMatic.
HAR_V302
required-request-post-data-parameter-name
Error
When a request postData is defined with params, a non-empty non-null name must be specified for each parameter using the name property.
If multiple responses are disabled via import settings provided in the APIMatic Metadata file, only response definitions 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.