Closed PrathibaJee closed 2 years ago
Discussion made on interface call on 26th of June : The current behavior mentioned in the scenario works as designed. The service /v1/dismantle-mediator-instance is idempotent , means executing the same request with the same set of attributes again, shall just lead to the same state. The advantage of the current behavior overweights the disadvantage , so decided to keep the design as it is.
The service /v1/dismantle-mediator-instance is to delete a mediator instance based on the provided "device-name" in the request-body.
Scenario : Provided a non-existing "device-name" in the request body , /v1/dismantle-mediator-instance responds back with -> response-code: 204 , description : "Mediator deleted". As per the specification , this looks like an expected behavior.
Proposal : The response "Mediator deleted" for a non-existing "device-name" gives a false impression of the operation. For the scenario , can we prescribe in the specification to respond with -> response-code: 400 , description : "Object does not exists". Kindly let us know your views.