[PATCH 3/3] /api/events: Add 'user' field to generated JSON
johan at herland.net
Tue Oct 8 08:05:42 AEDT 2019
On Mon, Oct 7, 2019 at 5:55 PM Stephen Finucane <stephen at that.guru> wrote:
> On Mon, 2019-10-07 at 00:57 +0200, Johan Herland wrote:
> > Cc: Mauro Carvalho Chehab <mchehab at osg.samsung.com>
> > Signed-off-by: Johan Herland <johan at herland.net>
> This looks pretty good and should stay almost the same even if earlier
> patches in the series change. If you can fix up that version check I
> think we're good to go.
Thanks again for reviewing.
> > diff --git a/docs/api/schemas/patchwork.j2 b/docs/api/schemas/patchwork.j2
> > index 16d85a3..0acb665 100644
> > --- a/docs/api/schemas/patchwork.j2
> > +++ b/docs/api/schemas/patchwork.j2
> > @@ -1510,6 +1510,12 @@ components:
> > type: string
> > format: iso8601
> > readOnly: true
> > + user:
> > + type: object
> > + title: The user responsible for this event
> > + readOnly: true
> > + allOf:
> > + - $ref: '#/components/schemas/UserEmbedded'
> You need to surround this with version checks to make sure this doesn't
> get emitted for the v1.0 and v1.1 APIs as they won't have this field.
> It'd be good to have an actual check that the person that edited the
> thing is set on the Event.user field.
Sure, I'll add a test that updates a patch via the REST API, and then
asserts that the resulting event has the correct actor set.
Johan Herland, <johan at herland.net>
More information about the Patchwork