required-request-header-key
Overview
This rule belongs to the postman-validation ruleset and states that:
When defining request headers, a non-empty name/key must be provided for each header using the key property.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required property key in header definition is empty/missing. |
| Code | POSTMAN_V354 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Requests |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | postman api semantic validation key header request item collection |
Suggested Fixes
- Key represents the unique name of the request header e.g.
Content-Type. - Add missing
keyproperty in the header definition object of the requestheaderlist. - Make sure that the
keyproperty value is not empty or null. - In the Postman application, navigate to the Headers section of your request and remove/disable all entries where
KEYis set as an empty value, save and export your collection and then try again.
For More Information
- https://learning.postman.com/collection-format/getting-started/structure-of-a-collection/#request
- https://learning.postman.com/collection-format/getting-started/structure-of-a-collection/#item
- https://learning.postman.com/docs/sending-requests/requests/
- 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/