Skip to main content

unique-case-insensitive-header-parameter-names

Overview

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

The parameters list can contain custom headers that are expected as part of the request. There can only be a single entry for each header in this list. Since the header names are case insensitive as per RFC7230 they will be compared accordingly.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageA definition for this header parameter already exists.
CodeOPENAPI3STANDARDS_L060
TypeLinting
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic linting name header parameter

Suggested Fixes

  • Remove duplicate entries for the header in the list.
  • Header names are compared in a case-insensitive manner. This means that headers named content-type and Content-Type are considered equal.

For More Information