[PATCH v2 12/13] REST: Add '/series' endpoint
Stephen Fincane
stephen at that.guru
Fri Nov 25 07:08:24 AEDT 2016
On Mon, 2016-11-21 at 17:25 +1100, Russell Currey wrote:
> On Sat, 2016-11-19 at 16:51 +0000, Stephen Finucane wrote:
> >
> > Adopt a hybrid approach, by adding an additional series endpoint to
> > the
> > existing patch endpoint:
> >
> > /series/${series_id}/
> > /patches/${patch_id}/
> >
> > This is based on the approach described here:
> >
> > http://softwareengineering.stackexchange.com/a/275007/106804
> >
> > This is necessary due to the N:N mapping of series and patches:
> > it's
> > possible for a patch to belong to many series, and a series usually
> > contains many patches. This means it is not possible to rely on the
> > patch endpoint alone.
> >
> > It is also necessary to add a cover letter endpoint, such that the
> > series body can include this.
> >
> > Signed-off-by: Stephen Finucane <stephen at that.guru>
> > Cc: Andy Doan <andy.doan at linaro.org>
> >
>
> Currently the url field points to /project/<id>/ rather than
> /series/<id>/, and
> there's no reference to the project that the series belongs to, which
> would be
> nice.
Fixed the first of these. The second one is tougher as I foolishly
didn't include a 'project' field on the 'Series' model. I can add a
migration to add it if you deem it valuable enough?
> Also to be clear, the patches array is guaranteed to be in order,
> right?
To the best of my knowledge, yes. I plan to add an 'expand' parameter
shortly which would let you view the patch body inline and sort
sensibly in the client.
Stephen
More information about the Patchwork
mailing list