New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Versioning API endpoints #710
Comments
That is one option, another is to use an accept header like how github does their versioning. See http://developer.github.com/v3/media/ Where the If you want the version to be part of the path then you can include it within the route path property.
|
hapi doesn't have an opinion on versions atm. We're looking into supporting Accept header for content negotiation which is cleaner than using /v1 in the path. In general, my personal view is that there should be one API. You use the same paths as long as they are backwards compatible, you use Accept header to change the response payload and content-type to change the request payload. And mint new paths for non-compatible changes. I would never do /v1 /v2 but that's just me. Either way, we will look into supporting these patterns in hapi soon. but probably post 1.0. |
Thanks for your thoughts. The |
Moved to backlog. |
The best source of alternatives: http://www.mnot.net/blog/2011/10/25/web_api_versioning_smackdown |
Duplicate of #252 |
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
Is there any advice on how to implement versioning?
For example:
The text was updated successfully, but these errors were encountered: