[PATCHv2 02/10] REST: Add base configuration hooks for a REST API
Andy Doan
andy.doan at linaro.org
Thu May 19 12:53:11 AEST 2016
On 05/18/2016 04:58 PM, Finucane, Stephen wrote:
> On 17 May 13:17, Finucane, Stephen wrote:
>> On 10 May 17:39, Andy Doan wrote:
>>> This adds the ability to expose a REST API based on the Django REST
>>> framework project. Since this project isn't packaged in most current
>>> distributions, we ensure that its both installed and enabled before
>>> trying to use it.
>>>
>>> Signed-off-by: Andy Doan <andy.doan at linaro.org>
>>> Inspired-by: Damien Lespiau <damien.lespiau at intel.com>
>>
>> Reviewed-by: Stephen Finucane <stephen.finucane at intel.com>
>
> Actually, I do have one comment after playing around with this a little
> more: what's the possibility of using a 'Link' header instead of
> a payload envelope? Seems to be pretty easy to do [1], it's a proposed
> RFC standard [2], and it's consistent with the GitHub API (which I
> happen to admire) [3]. Certainly won't block on it though. Thoughts?
Since it changes the payload I think we should get it right now before
doing a merge. Personally, I kind of like the wrapped payload because
its more obvious to someone poking around at the URLs that's not paying
attention to headers. However, it looks like this is where things are
going. I'm wrapping up work on my v3 set right now, so I'll go ahead and
see if I can fit this in with it.
> [1] http://www.django-rest-framework.org/api-guide/pagination/#header-based-pagination
> [2] https://tools.ietf.org/html/rfc5988#section-5
> [3] https://developer.github.com/guides/traversing-with-pagination/
>
More information about the Patchwork
mailing list