Comment by globular-toast

2 days ago

This seems to mostly boil down to including links rather than just IDs and having the client "just know" how to use those IDs.

Django Rest Framework seems to do this by default. There seems very little reason not to include links over hardcoding URLs in clients. Imagine just being able to restructure your backend and clients just follow along. No complicated migrations etc. I suspect many people just live with crappy backends because it's too difficult to coordinate the rollout of a v2 API.

However, this doesn't cover everything. There's still a ton of "out of band" information shared between client and server. Maybe there's a way to embed Swagger-style docs directly into an API and truly decouple server and client, bit it would seem to take a lot more than just using links over IDs.

Still I think there's nothing to lose by using links over IDs. Just do it on your next API (or use something like DRF that does it for you).