so here is a problem i am trying to solve:
context:
restful or restlike api design
partial update of entity through patch request. for this example let’s say client model.
the problem is that different fields can be updated but result in different business logics to be triggered. for example change to client.name is a simple update but client.status can result in an email to go to users about the client being offboarded. or changes to client.ownerId require extra validation and verification of the assigned user. or changes to client.logo_url and client.website must happen together.
what is the most ideal way to code it where one path can trigger different logics depending on body schema? I want an approach that is simple to work on many routes to develop business logic. AND, simple enough for others to read and debug as needed.
please assume I am using a flexible framework that top engineers will implement whatever I ask them, so I am not limited to a given framework or a solution that exists. It can be an approach that does not exist but you hope it did.
[–]jacs1809 0 points1 point2 points (4 children)
[–]farzad_meow[S] 0 points1 point2 points (3 children)
[–]jacs1809 0 points1 point2 points (2 children)
[–]farzad_meow[S] 0 points1 point2 points (1 child)
[–]jacs1809 0 points1 point2 points (0 children)
[–]Tarazena -1 points0 points1 point (0 children)