[PATCH 1/2] REST: Fix versioning

Stephen Finucane stephen at that.guru
Sat Apr 29 09:07:35 AEST 2017

On Thu, 2017-04-27 at 00:58 +0100, Stephen Finucane wrote:
> One of the few remaining warts in the API is versioning. There is
> some
> basic versioning there, but it doesn't work properly as-is. Fix this
> by
> correcting the index endpoint ('/') to use Django REST Framework's
> 'reverse' function [1], which handles versioning for us [2] and
> switching from 'NamespaceVersioning' to 'URLPathVersioning', the
> latter
> of which does the same thing but in a different way.
> [1] http://www.django-rest-framework.org/api-guide/reverse/#reverse
> [2] http://www.django-rest-framework.org/api-guide/versioning/#revers
> ing-urls-for-versioned-apis
> [3] http://www.django-rest-framework.org/api-guide/versioning/#urlpat
> hversioning
> Signed-off-by: Stephen Finucane <stephen at that.guru>
> Cc: Andy Doan <andy.doan at linaro.org>

The first one of these is a clear bug fix while the second is a bit
contentious but is a clear usability win. I've bit the bullet and just
applied both.


More information about the Patchwork mailing list