Oisín Hurley's Weblog

old dog, new tricks

Posts Tagged ‘gist

Enforce Web API version compatibility with Sinatra filters

leave a comment »

Versioning in APIs is vital if you want to control the lifecycle, rather than it controlling you. If you are using Sinatra to do routing for your Web API, then you can easily stuff all the version compatibility testing into one place – a filter – and not have to propagate it through all your routes. Follow the gist to see the code.



Written by oisinhurley

May 3, 2011 at 12:13 am