←back to thread

428 points ahamez | 1 comments | | HN request time: 0.202s | source
Show context
pixl97 ◴[] No.45008158[source]
While the author doesn't seem to like version based APIs very much, I always recommend baking them in from the very start of your application.

You cannot predict the future and chances are there will be some breaking change forced upon you by someone or something out of your control.

replies(7): >>45008436 #>>45008763 #>>45009169 #>>45009423 #>>45009623 #>>45010511 #>>45010673 #
JimDabell ◴[] No.45010673[source]
> While the author doesn't seem to like version based APIs very much, I always recommend baking them in from the very start of your application.

You don’t really need to do that for REST APIs. If clients request application/vnd.foobar then you can always add application/vnd.foo.bar;version=2 later without planning this in advance.

replies(4): >>45011079 #>>45011820 #>>45018380 #>>45018873 #
1. 9dev ◴[] No.45018380[source]
Actually, there’s nothing stopping you from using a custom "Version: 2" Header in requests and responses