The analysis team worked on some specification which sounds a bit strange to me.
I have to delete a resource on a database table. I have the id of the rekord as input parameter.
This is straight forward http delete operation.
DELETE http://my-url/{id}
They want to add as input parameters some other values, present in the rekord, because, they say "the delete operation is very delicate in this case and we want to be sure to exclude errors in frontend, the id passed is should be the id of the values of the rekord passed".
There were a lot of internal discussion about this requirement. Dishes flew between partecipants. Anyway we have to satisfy it.
I know this is not more RESTful operation.
I modified like this:
DELETE http://my-url/{id}
REQEUST BODY
{
"myProperty1" = 123,
"myProperty2" = "VALUE",
...
}
Swagger generation gets angry about DELETE with REQUEST BODY.
I have to switch to
- POST operation with REQUEST BODY
- DELETE operation with some REQUEST PARAMS
The development team likes to stay as long as possible in a RESTful environment. What would be better not to be out of tune?
ANY OTHER ADVICE OR SOLUTION WE DID NOT THINK WOULD BE APPRECIATED.