Skip to main content

no-empty-folder

Overview

This rule belongs to the postman-validation ruleset and states that:

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.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageFolder/item group is empty.
CodePOSTMAN_V254
TypeValidation
Rule SystemSemantic
Broad CategoryFolders
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagspostman api semantic validation items folder item group collection

Suggested Fixes

  • For Postman v1.0, ensure that either the order or folders_order property are present and are non-empty.
  • For Postman v2.0, ensure that all item groups/folders has an inner item property set which is a non-empty list.
  • In your Postman application, move a request or another folder to the target folder which is empty, save and export your collection and then try again.

For More Information