3 ms·
While you can build machinery to do this. It is far easier to not. If you substantially want to change your api, just make a new one. Much easier to track mi
by taeric 7y ago
While you can build machinery to do this. It is far easier to not. If you substantially want to change your api, just make a new one. Much easier to track migration between endpoints than it is versions in an endpoint.
And, in general, don't focus on generic methods.
The more specific a service method, the better. The less it does, the better. Don't have an "order pizza" api. Have a "start order", "add to order", and "complete order" api. If it helps, have multiple add methods. The parameters to add a pizza can and should be different from a salad. Even the pizza may be better served with partial service calls to start and complete.