Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow to have optional requestBody (required: false) #42

@Karry

Description

@Karry

Hi, would it be possible to have optional request body? As written in OpenAPI documentation, it should be optional by default, but even when it is defined explicitly:

...
      requestBody:
        required: false
        content:
          application/json:
            schema:
              ...

...lepo fails to parse request without content and fails with HTTP/400 {"error": "{'_body': InvalidBodyContent('Unable to parse this body as application/json')}"}. It is necessary to send empty json at least...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions