Header with the name 'Content-Type' is ignored

Description

You have used a restricted value as the name of a header. The values Accept, Content-Type, and Authorization are restricted values and should not be used as the header name. A header with any of these values as the header name is ignored.

For more details, see the OpenAPI Specification.

Example

The following is an example of how this issue could look in your API definition:

1headers:
2  Content-type:
3    application/json:
4      schema:
5        $ref: "#/components/schemas/Pet"
6

Remediation

Make sure that you do not use the restricted values as header parameter names.

1headers:
2  Pet:
3    application/json:
4      schema:
5        $ref: "#/components/schemas/Pet"
6

Copyright 42Crunch 2021