stadlar / IST-FUT-FMTH

Creative Commons Attribution 4.0 International
12 stars 19 forks source link

Claims - Redundancy in PATCH Endpoint for Claims with claimId Present in Both URI and Request Body #210

Closed thebingi closed 10 months ago

thebingi commented 10 months ago

The current implementation of the PATCH method for updating claim information includes the claimId in both the URI (/v1/claims/{claimId}) and the request body. This redundancy could lead to potential confusion and inconsistencies within the API, as it is not clear which identifier should take precedence if they differ.

The claimId should be included exclusively in the URI to adhere to RESTful principles, which dictate that the URI should uniquely identify the resource to be modified. The request body should only contain the fields that are intended to be updated.

kristinnstefansson commented 10 months ago

Meeting TN-FMÞ-VH7-21 reviewed at this and was unanimous in this being an improvement that could be handled as a patch to the 3.1 branch that would not affect any current implementations, there being none at the moment.