The ruleset APIMatic uses to validate Postman documents.
APIMatic validates Postman documents (Postman Collections v1.0 and v2.x, Postman data dumps, and Postman environment files) against the ruleset below. These include rules defined by the standard as well as additional checks APIMatic enforces for better output.
Validation checks performed on files associated with Postman e.g. Postman Collections, Postman Environment files, Postman data dump files or general Postman data files.
The provided Postman Collection 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.
POSTMAN_V002
valid-postman-data-dump-syntax
Blocking
A Postman Data Dump 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 e.g. collections in the data dump must follow the Postman v1.0 format. Note also, that only the first collection from the data dump file will be imported/transformed in APIMatic. It is recommended to input a Postman Collection file directly in APIMatic along with any relevant data/environment files instead of using a complete data dump file containing multiple collections.
POSTMAN_V003
valid-postman-environment-syntax
Blocking
The provided Postman Environment 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 root object of a Postman Collection (v2.0 and above) must contain basic information or metadata related to the collection using the info property.
POSTMAN_V101
required-collection-info-name
Error
The root info object of a Postman Collection (v2.0 and above) must assign a user-friendly name for the collection using the name property. If name information is not provided, a default title will be assigned automatically during import/transformations in APIMatic.
POSTMAN_V102
required-collection-name
Error
The root object of a Postman Collection v1.0 must assign a user-friendly name for the collection using the name property. If a name is not provided, a default value will be assumed automatically during import/transformations in APIMatic.
The URL defined for a Postman Collection 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.
POSTMAN_V151
required-request-server-url-variable-value
Error
If a url defined in a Postman Collection request resource contains a variable using curly braces {{name}}, a corresponding value for the variable must be provided in either of the following: collection variables, enviroment variables or data variables. If you've used environment or data variables, their information must be exported from the Postman application in the form of external data/environment files and uploaded along with the Postman Collection in a ZIP file. The variable name used in the URL must match exactly with the pre-defined variable and the value provided this way must be non-empty. If a variable entry does not exist or the value is empty, a default value will be assumed for the variable automatically during import/transformations in APIMatic.
The root object of a Postman Collection (v2.0 and above) must contain request or request folder definitions using the root item property.
POSTMAN_V201
at-least-one-item
Warning
The root items of a Postman Collection (v2.0 and above) specified using item property must be a non-empty list of item definitions (HTTP request item or item group).
The root object of a Postman Collection v1.0 must contain request folder definitions using the root folders property.
POSTMAN_V251
at-least-one-folder
Warning
In a collection, related requests should be grouped into a folder for easy navigation and discovery. For Postman v1.0, one or more folder definitions could be added in the root folders property whereas for Postman v2.0 or above, the root item property could define folders by adding one or more item groups.
POSTMAN_V252
required-folder-name
Error
When defining a folder or an item group, a user-friendly name for it must be provided using the name property. This can be set while defining the folder in the Postman application.
POSTMAN_V253
required-folder-items
Warning
An item group/folder in the Postman Collection v2.0 and above must define the item property to help define any inner items nested inside the folder.
POSTMAN_V254
no-empty-folder
Warning
In a collection, a folder can either directly contain one or more requests or another folder instead. A folder must not be empty as then it loses its intended purpose and becomes less meaningful in terms of organization and structure. For Postman v1.0, ensure that the order or folders_order property in a folder definition is not empty/null. Similarly, for Postman v2.0 and above, ensure that the item property in the folder/item group contains at least one request item or item group definition.
The root object of a Postman Collection v1.0 must define one or more requests using the root requests property.
POSTMAN_V351
at-least-one-request
Warning
A collection must define one or more requests. For Postman v1.0, the request definitions must be added in the root level requests property whereas for Postman v2.0 or above, requests can be defined by adding one or more request items in either the root level item list directly or within another item group's/folder's item list.
POSTMAN_V352
required-request-name
Error
When defining a request item, a user-friendly name for it must be provided using the name property. This can be set while defining the request in the Postman application. If a name is unavailable a default value will be assumed automatically during import/transformations in APIMatic.
POSTMAN_V353
required-item-request
Error
The request item object of a Postman Collection v2.0 and above document must define details related to the HTTP request using the request property.
POSTMAN_V354
required-request-header-key
Error
When defining request headers, a non-empty name/key must be provided for each header using the key property.
POSTMAN_V355
required-request-header-value
Error
When defining request headers, a non-empty input value must be provided for each header using the value property.
POSTMAN_V356
no-request-payload-with-get-method
Warning
A request that uses method GET must not define a payload. This means that for Postman Collections v1.0, sending the payload should either be disabled using the request's dataDisabled flag or properties data, rawModeData and dataMode must not be set. Similarly, for Postman Collections v2.0 or above, property body in the request should either not be set or it should be disabled using the body object level disabled flag. 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 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. Responses defined in a request which are outside the supported range will be ignored automatically during import/transformations in APIMatic.
If the authentication type is oauth2 and grant_type 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 authUrl property. If the authorization URL information is missing, a dummy value will be assigned to it automatically during import/transformations in APIMatic.
POSTMAN_V501
required-oauth2-access-token-url
Error
If the authentication type is oauth2 and grant_type 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 access token URL information is missing, a dummy value will be assigned to it automatically during import/transformations in APIMatic.
If a value in the Postman Collection contains a variable using curly braces {{name}}, a corresponding value for the variable must be provided in either of the following: collection variables, enviroment variables or data variables. If you've used environment or data variables, their information must be exported from the Postman application in the form of external data/environment files and uploaded along with the Postman Collection in a ZIP file. The variable name used must match exactly with the pre-defined variable and the value provided this way must be non-empty.