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

DELETE operations cannot have a requestBody. #2026

Closed
melmccann opened this issue Aug 11, 2020 · 3 comments
Closed

DELETE operations cannot have a requestBody. #2026

melmccann opened this issue Aug 11, 2020 · 3 comments

Comments

@melmccann
Copy link
Contributor

@KtorZ
Copy link
Member

KtorZ commented Aug 11, 2020

Hmm? What do you mean @melmccann ?

@melmccann
Copy link
Contributor Author

I added this just to keep in line with OpenAPI, so stubs can be generated from swagger.yaml without error.
You can have a requestBody for a DELETE but for some reason OpenApi doesn't allow it.
OAI/OpenAPI-Specification#1801
You can close this issue if you feel it is their problem not ours @KtorZ

@KtorZ
Copy link
Member

KtorZ commented Aug 12, 2020

Well, request bodies on DELETE request is actually not forbidden by the RFC 7231 which specifies the HTTP/1.1 protocol. The only verb that for which a request body is strictly forbidden is HEAD.

It also seems that the OpenAPI specifications eventually changed their own design to allow this: OAI/OpenAPI-Specification#2117

@KtorZ KtorZ closed this as completed Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants