Skip to main content

no-accept-header-parameter-definition

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

The parameters list must not contain an explicit definition for the Accept header parameter. If a definition is added, it will be ignored.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageDefinition for Accept header parameter found.
CodeOPENAPI3STANDARDS_V083
TypeValidation
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation accept header parameter

Suggested Fixes

  • Ensure that the parameters list does not contain a parameter named Accept with location set as header.
  • Remove the entry for parameter named Accept from the parameters list.
  • Use the responses level content media types to convey the information related to expected/acceptable media types.

For More Information