cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: "Delete operations cannot have a requestBody"

Occasional Contributor

Bug: "Delete operations cannot have a requestBody"

I'm using Swagger/OAS3 to document our existing API.  When I document the DELETE method in one endpoint I get the following message:

Delete operations cannot have  a requestBody

This endpoint uses the request body to pass a UserID, in the same way that our POST and PUT methods work.

This has been discussed elsewhere as a bug: https://github.com/swagger-api/swagger-ui/issues/4425

When will this be fixed or can the error be disabled.

Thank you.

1 REPLY 1
Moderator

Re: Bug: "Delete operations cannot have a requestBody"

OAS3 does not allow payloads for DELETE operations. Therefore, this is not a bug, and we won't be able to change the behavior of it unless the specification changes.


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video: