Skip to content

Instantly share code, notes, and snippets.

View brayzen's full-sized avatar

Brian Sheldon Ray brayzen

View GitHub Profile
@brayzen
brayzen / gist:f235035d316b92e02dea
Created October 29, 2015 06:34
API versioning.....what? why? How
API versioning:
WHAT? and WHY?
We're talking about having an application programming interface that spits out JSON for other applications to use. Inevitably, as a developer, looking for better names, and better ways of doing something is a constant theme. It becomes contentious because any developer knows that changing something inevitably means something else will break. Thus the need to keep support for an old version and make changes to a new version.
HOW?:
I found a well written article (www.troyhunt.com/2014/02/your-api-versioning-is-wrong-which-is.html?m=1) that sort of walks through the different methods by which a developer can instantiate a new version for his/her API.
1st Option: CHANGE THE URL.....his example was something like example.com/api/v2
Pros: easy
Cons: namespace doesn't seem to match up (kluegy)