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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Folder/item group is empty. |
Code | POSTMAN_V254 |
Type | Validation |
Rule System | Semantic |
Broad Category | Folders |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | postman api semantic validation items folder item group collection |
Suggested Fixes
- For Postman v1.0, ensure that either the
order
orfolders_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
- https://learning.postman.com/collection-format/getting-started/structure-of-a-collection/#item-groups
- https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html
- https://schema.postman.com/collection/json/v2.1.0/draft-07/collection.json
- https://schema.postman.com/collection/json/v2.0.0/draft-07/docs/index.html
- https://schema.postman.com/collection/json/v2.0.0/draft-07/collection.json
- https://learning.postman.com/docs/introduction/overview/
- https://docs.apimatic.io/rulesets/overview/