[PATCH v3 00/16] Implement series REST API

Stephen Finucane stephen at that.guru
Sat Nov 26 05:18:19 AEDT 2016


Time to expose series via the REST API. As you can tell, this series
actually covers a lot more work than pure series work. Most of this
is based off of discussions I had with Andy Doan regarding making the
REST API code a little easier to maintain. This does result in some
changes to the API, but seeing as we don't actually pledge to support
Patchwork from master and the API isn't in a release (yet!), I think
this is an acceptable situation.

Changes since v2:
- Address review comments
- Rebased onto latest master

Stephen Finucane (16):
  docker: Don't force rebuilds
  REST: Create 'api' directory
  REST: Remove '_url' suffixes
  REST: Use SerializerMethod field
  REST: Explicitly define fields
  REST: Make use of the 'source' property
  REST: Resolve performance issues with tags
  REST: Use generic views instead of ViewSets
  REST: Make 'Patch.state' editable
  REST: Make 'User.first_name', 'last_name' editable
  tests: Rework REST API tests
  tests: Standardize validation of REST API JSON
  REST: Add id field to all endpoints
  REST: Add maintainers to '/projects'
  REST: Add '/series' endpoint
  docs: Update swagger definition

 docs/api.yaml                    | 298 +++++++++++++++------
 patchwork/api/__init__.py        |   0
 patchwork/api/base.py            |  79 ++++++
 patchwork/api/check.py           | 111 ++++++++
 patchwork/api/cover.py           |  89 +++++++
 patchwork/api/index.py           |  36 +++
 patchwork/api/patch.py           | 137 ++++++++++
 patchwork/api/person.py          |  55 ++++
 patchwork/api/project.py         |  83 ++++++
 patchwork/api/series.py          |  60 +++++
 patchwork/api/user.py            |  65 +++++
 patchwork/models.py              |  13 +-
 patchwork/rest_serializers.py    | 147 ----------
 patchwork/settings/base.py       |   4 +-
 patchwork/tests/test_rest_api.py | 560 +++++++++++++++++++++++++--------------
 patchwork/urls.py                |  63 ++++-
 patchwork/views/rest_api.py      | 175 ------------
 requirements-dev.txt             |   1 -
 requirements-prod.txt            |   1 -
 tools/docker/entrypoint.sh       |   3 +-
 tox.ini                          |   1 -
 21 files changed, 1361 insertions(+), 620 deletions(-)
 create mode 100644 patchwork/api/__init__.py
 create mode 100644 patchwork/api/base.py
 create mode 100644 patchwork/api/check.py
 create mode 100644 patchwork/api/cover.py
 create mode 100644 patchwork/api/index.py
 create mode 100644 patchwork/api/patch.py
 create mode 100644 patchwork/api/person.py
 create mode 100644 patchwork/api/project.py
 create mode 100644 patchwork/api/series.py
 create mode 100644 patchwork/api/user.py
 delete mode 100644 patchwork/rest_serializers.py
 delete mode 100644 patchwork/views/rest_api.py

-- 
2.7.4



More information about the Patchwork mailing list