Skip to content

Missing required header \"Content-Type\" for Request [put .....] when requestBody has required: false #233

@tomasjanda

Description

@tomasjanda

Hello, i have problem with PUT operation, when body is optional, in OAS3.1 specified as:

  requestBody:
    required: false
    description: XXXXX
    content:
      application/json:
        schema:
          $ref: '../../common/objects.yaml#/components/schemas/XXXXX'

When request is set with missing Content-Type and Content-Lenght is set to 0, i still got error Missing required header "Content-Type" for Request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions