3 ms·
Currently I structure my URLs like this: /v1/2017-06-08/blah The idea is that you write in the date that you wrote the implementation against the API. Thi
by BillinghamJ 9y ago
Currently I structure my URLs like this:
/v1/2017-06-08/blah
The idea is that you write in the date that you wrote the implementation against the API. This is just like Stripe's API, but explicit rather than implicit. Then everything under that will continue to work as-is.
There's a few reasons I like to do this, but the main one is that I often struggle to decide whether a given change is really "worthy" of a major version change.
The only rule/caveat we have is: within a given client's implementation, you should only use one date at a time. Mixing them creates a small possibility of compatibility issues.
The initial /v1/ is just in case I decide to move away from the date thing at some stage.
- edoceo 9y agoI'm similar but just prefix like /v2014 I assume I won't make multiple versions in a year. I have a current system with /v2014, /v2016 and /v2017 I like to smash dates into all my version strings
- cyann 9y agoYes, human readable dates are very good at conveying a sense of obsolescence. Mine are a bit more granular: /vyymm, e.g. /v1503, /v1610, /v1706. This should work well for this century ;-)