Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageRequired property key in header definition is empty/missing.
CodePOSTMAN_V354
TypeValidation
Rule SystemSemantic
Broad CategoryRequests
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagspostman 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 key property in the header definition object of the request header list.
  • Make sure that the key property value is not empty or null.
  • In the Postman application, navigate to the Headers section of your request and remove/disable all entries where KEY is set as an empty value, save and export your collection and then try again.

For More Information