Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Karry opened this issue Nov 22, 2021 · 0 comments
Open

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

Karry opened this issue Nov 22, 2021 · 0 comments
Assignees

Comments

@Karry
Copy link
Contributor

Karry commented Nov 22, 2021

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...

@akx akx added the enhancement label Mar 4, 2022
@akx akx self-assigned this Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants