On 11/19/2016 10:51 AM, Stephen Finucane wrote:
This was a design decision made when implementing the REST API. The
idea was that these items were URLs to related objects and should be
indicated as such. However, this was a faulty assumption as the
Patchwork API, unlike other some other APIs (GitHub), does not also
include a full representation of said objects, like so:

    {
      "url": "http://localhost:8000/api/1.0/patches/1/";,
      ...
      "delegate_url": "http://localhost:8000/api/1.0/users/1";,
      "delegate": {
        "url": "http://localhost:8000/api/1.0/users/1/";,
        "username": "admin",
        "first_name": "",
        "last_name": "",
        "email": ""
      }
    }

Since there is no intention to support this design yet, there isn't
really any reason to fight django-rest-framework in appending these
suffixes. Simply remove them.

Note that the API version if not bumped as the API is still considered
unreleased.

Signed-off-by: Stephen Finucane <[email protected]>
Cc: Andy Doan <[email protected]>

Makes things a little easier, and removes a hack:

Reviewed-by: Andy Doan <[email protected]>

_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to