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:

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

Thank you.


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:
Top Kudoed Authors
Top Kudoed Posts