Titan icon indicating copy to clipboard operation
Titan copied to clipboard

As a user, I want to easily version my APIs

Open swizzlr opened this issue 7 years ago • 0 comments

The current user story is "use predicates and all of their pitfalls".

Quoth the Ryan:

A better versioning system for routes vs the current predicate method. There has to be a nicer way to do that, such as passing Titan arrays of functions that generate routes to match a certain version number + an extra array of unversioned routes. Bonus: we get a standardized header & error handling across services (X-API-Version vs X-App-Version, etc...)

things like matching * to routes, but only for versioned routes so you can warn without triggering warnings on unversioned routes

currently it's a bit tricky with more than one API version to add warnings only for versioned routes without falsely triggering them on all other calls

because * will match regardless of whether or not there's another route after a predicate condition

Both Hermes and Athena had this problem with logging false failures on /heathz despite being fine, and Athena in particular had to hack around this until I deprecated older API versions for just one

not to mention how long and ugly a predicate gets with multiple versions supported

swizzlr avatar Nov 16 '17 14:11 swizzlr