DEV Community

Discussion on: Real World Developer's Problems: API Versioning

Collapse
 
cdimonaco profile image
Carmine Di Monaco

I think the Uri approach is the Best in the long term, it's straightforward in terms of clarity for the consumers, even without a full fledged framework, you can do the job easily.

I've done many apiis with both Go, with just chi as router and more recently, RoR. In both cases I had no problems at all.

The headers solution can be used in more bounded context, like internal communications between microservices, this approach lost clarity but can be more comfortable migrate between versions in complex sistems, just like changing a header, maybe with an environment variable or stuff like that.