Forum Discussion

kevinashaw's avatar
kevinashaw
Occasional Contributor
6 years ago

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.

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