Define & Validate APIsValidation Rulesets

Postman Rulesets

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.

Postman Validation

Validation checks performed on files associated with Postman e.g. Postman Collections, Postman Environment files, Postman data dump files or general Postman data files.

PropertyValue
Ruleset IDpostman-validation
Code prefixPOSTMAN_V
TypeValidation
Default severityError
Rule systemSemantic
Rules26

Basic Structure

CodeRuleSeverityWhat it checks
POSTMAN_V001valid-postman-collection-syntaxBlockingThe 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_V002valid-postman-data-dump-syntaxBlockingA 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_V003valid-postman-environment-syntaxBlockingThe 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.

Collection Metadata

CodeRuleSeverityWhat it checks
POSTMAN_V100required-collection-infoErrorThe 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_V101required-collection-info-nameErrorThe 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_V102required-collection-nameErrorThe 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.

API Servers

CodeRuleSeverityWhat it checks
POSTMAN_V150required-request-server-base-urlErrorThe 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_V151required-request-server-url-variable-valueErrorIf 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.

Items

CodeRuleSeverityWhat it checks
POSTMAN_V200required-collection-itemsErrorThe root object of a Postman Collection (v2.0 and above) must contain request or request folder definitions using the root item property.
POSTMAN_V201at-least-one-itemWarningThe 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).

Folders

CodeRuleSeverityWhat it checks
POSTMAN_V250required-collection-foldersWarningThe root object of a Postman Collection v1.0 must contain request folder definitions using the root folders property.
POSTMAN_V251at-least-one-folderWarningIn 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_V252required-folder-nameErrorWhen 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_V253required-folder-itemsWarningAn 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_V254no-empty-folderWarningIn 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.

Requests

CodeRuleSeverityWhat it checks
POSTMAN_V350required-collection-requestsErrorThe root object of a Postman Collection v1.0 must define one or more requests using the root requests property.
POSTMAN_V351at-least-one-requestWarningA 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_V352required-request-nameErrorWhen 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_V353required-item-requestErrorThe 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_V354required-request-header-keyErrorWhen defining request headers, a non-empty name/key must be provided for each header using the key property.
POSTMAN_V355required-request-header-valueErrorWhen defining request headers, a non-empty input value must be provided for each header using the value property.
POSTMAN_V356no-request-payload-with-get-methodWarningA 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.

Responses

CodeRuleSeverityWhat it checks
POSTMAN_V450supported-response-status-codeWarningIf 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.

Authentication

CodeRuleSeverityWhat it checks
POSTMAN_V500required-oauth2-authorization-urlErrorIf 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_V501required-oauth2-access-token-urlErrorIf 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.

Miscellaneous

CodeRuleSeverityWhat it checks
POSTMAN_V600required-environment-or-data-file-for-variablesInformationIf 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.

Learn more

On this page