diff options
author | Stephen Finucane <stephen@that.guru> | 2018-03-25 19:28:20 +0100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2018-04-07 17:43:26 +0100 |
commit | d944f17ec05950ef172dd8a938369570c5745a98 (patch) | |
tree | f2bb264d89fbf9652a1afdb93d83e6a9ddd2a487 /patchwork/urls.py | |
parent | 683792d1f37c97306f241ca5f9e2b0cda162891c (diff) | |
download | patchwork-d944f17ec05950ef172dd8a938369570c5745a98.tar patchwork-d944f17ec05950ef172dd8a938369570c5745a98.tar.gz |
REST: Use versioning for modified responses
This ensures clients are getting a consistent response if they request
the old version of the API. We do this by way of extensions to the
'HyperlinkedModelSerializer' class rather than duplicating the
serializers as it results in far less duplication. This approach won't
work for a MAJOR version bump but, all going well, it will be a while
before we have to deal with one of these.
The only two fields added since API 1.0 was released, 'cover.mbox' and
'project.subject_match', are handled accordingly.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'patchwork/urls.py')
-rw-r--r-- | patchwork/urls.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/patchwork/urls.py b/patchwork/urls.py index 7193472..0893fe2 100644 --- a/patchwork/urls.py +++ b/patchwork/urls.py @@ -280,7 +280,7 @@ if settings.ENABLE_REST_API: ] urlpatterns += [ - url(r'^api/(?:(?P<version>(1.0))/)?', include(api_patterns)), + url(r'^api/(?:(?P<version>(1.0|1.1))/)?', include(api_patterns)), # token change url(r'^user/generate-token/$', user_views.generate_token, |