[PATCH v2 02/13] REST: Remove '_url' suffixes
Andy Doan
andy.doan at linaro.org
Wed Nov 23 04:45:41 AEDT 2016
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 <stephen at that.guru>
> Cc: Andy Doan <andy.doan at linaro.org>
Makes things a little easier, and removes a hack:
Reviewed-by: Andy Doan <andy.doan at linaro.org>
More information about the Patchwork
mailing list