django-rest-framework: api versioning
Posted
by
w--
on Stack Overflow
See other posts from Stack Overflow
or by w--
Published on 2013-01-11T00:24:19Z
Indexed on
2014/08/22
4:20 UTC
Read the original article
Hit count: 573
so googling around it appears that the general consensus is that embedding version numbers in REST URIs is a bad practice and a bad idea.
even on SO there are strong proponents supporting this.
e.g. Best practices for API versioning?
My question is about how to accomplish the proposed solution of using the accept header / content negotiation in the django-rest-framework to accomplish this.
It looks like content negotiation in the framework,
http://django-rest-framework.org/api-guide/content-negotiation.html
is already configured to automatically return intended values based on accepted MIME types. If I start using the Accept header for custom types, I'll lose this benefit of the framework.
Is there a better way to accomplish this in the framework?
© Stack Overflow or respective owner