18 ms·
I really like this way of versioning https://medium.com/@XenoSnowFox/youre-thinking-about-api-versioning-in-the-wrong-way-6c656c1c516b https://medium.com/@XenoS
by hummingn3rd 5y ago
I really like this way of versioning https://medium.com/@XenoSnowFox/youre-thinking-about-api-versioning-in-the-wrong-way-6c656c1c516b https://medium.com/@XenoSnowFox/youre-thinking-about-api-ver...
It uses Accept and Content-Type to version resources: application/vnd.company.article-v1+json
- BossingAround 5y agoInteresting! Personally, if I had to go to the lengths of the article, I might as well use a schema registry like Avro.
- kortex 5y agoThat's...really clever, but at the same time, I feel like there's a lot of assumptions baked into how Content-Types are used, and making your own content-type for each data model when it's all just application/json seems...wrong to me on an intuitive level, but I can't quite annunciate why. I only half agree with the sentiment that /api/v1 violates REST patterns. I don't think there's any guarantee that /api/v1/bars/123 can't be the same object as /api/v2/bars/123.