]> git.ipfire.org Git - thirdparty/patchwork.git/commit
REST: Use versioning for modified responses
authorStephen Finucane <stephen@that.guru>
Sun, 25 Mar 2018 18:28:20 +0000 (19:28 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 7 Apr 2018 16:43:26 +0000 (17:43 +0100)
commitd944f17ec05950ef172dd8a938369570c5745a98
treef2bb264d89fbf9652a1afdb93d83e6a9ddd2a487
parent683792d1f37c97306f241ca5f9e2b0cda162891c
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>
patchwork/api/base.py
patchwork/api/cover.py
patchwork/api/embedded.py
patchwork/api/project.py
patchwork/tests/api/test_cover.py
patchwork/tests/api/test_project.py
patchwork/urls.py