Skip to content

Commit 5b03443

Browse files
Raxel Gutierrezdaxtens
authored andcommitted
api: add auto-generated OpenAPI schema files
Signed-off-by: Raxel Gutierrez <raxel@google.com> Signed-off-by: Daniel Axtens <dja@axtens.net>
1 parent 88f5605 commit 5b03443

File tree

2 files changed

+2928
-1
lines changed

2 files changed

+2928
-1
lines changed

docs/api/schemas/latest/patchwork.yaml

Lines changed: 158 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ info:
1313
license:
1414
name: GPL v2 License
1515
url: https://www.gnu.org/licenses/gpl-2.0.html
16-
version: '1.2'
16+
version: '1.3'
1717
paths:
1818
/api/:
1919
get:
@@ -317,6 +317,72 @@ paths:
317317
$ref: '#/components/schemas/Error'
318318
tags:
319319
- comments
320+
/api/covers/{cover_id}/comments/{comment_id}/:
321+
parameters:
322+
- in: path
323+
name: cover_id
324+
description: A unique integer value identifying the parent cover.
325+
required: true
326+
schema:
327+
title: Cover ID
328+
type: integer
329+
- in: path
330+
name: comment_id
331+
description: A unique integer value identifying this comment.
332+
required: true
333+
schema:
334+
title: Comment ID
335+
type: integer
336+
get:
337+
description: Show a cover comment.
338+
operationId: cover_comments_read
339+
responses:
340+
'200':
341+
description: ''
342+
content:
343+
application/json:
344+
schema:
345+
$ref: '#/components/schemas/Comment'
346+
'404':
347+
description: Not found
348+
content:
349+
application/json:
350+
schema:
351+
$ref: '#/components/schemas/Error'
352+
tags:
353+
- comments
354+
patch:
355+
description: Update a cover comment (partial).
356+
operationId: cover_comments_partial_update
357+
requestBody:
358+
$ref: '#/components/requestBodies/Comment'
359+
responses:
360+
'200':
361+
description: ''
362+
content:
363+
application/json:
364+
schema:
365+
$ref: '#/components/schemas/Comment'
366+
'400':
367+
description: Invalid Request
368+
content:
369+
application/json:
370+
schema:
371+
$ref: '#/components/schemas/ErrorCommentUpdate'
372+
'403':
373+
description: Forbidden
374+
content:
375+
application/json:
376+
schema:
377+
$ref: '#/components/schemas/Error'
378+
'404':
379+
description: Not found
380+
content:
381+
application/json:
382+
schema:
383+
$ref: '#/components/schemas/Error'
384+
tags:
385+
- comments
320386
/api/events/:
321387
get:
322388
description: List events.
@@ -635,6 +701,72 @@ paths:
635701
$ref: '#/components/schemas/Error'
636702
tags:
637703
- comments
704+
/api/patches/{patch_id}/comments/{comment_id}/:
705+
parameters:
706+
- in: path
707+
name: patch_id
708+
description: A unique integer value identifying the parent patch.
709+
required: true
710+
schema:
711+
title: Patch ID
712+
type: integer
713+
- in: path
714+
name: comment_id
715+
description: A unique integer value identifying this comment.
716+
required: true
717+
schema:
718+
title: Comment ID
719+
type: integer
720+
get:
721+
description: Show a patch comment.
722+
operationId: patch_comments_read
723+
responses:
724+
'200':
725+
description: ''
726+
content:
727+
application/json:
728+
schema:
729+
$ref: '#/components/schemas/Comment'
730+
'404':
731+
description: Not found
732+
content:
733+
application/json:
734+
schema:
735+
$ref: '#/components/schemas/Error'
736+
tags:
737+
- comments
738+
patch:
739+
description: Update a patch comment (partial).
740+
operationId: patch_comments_partial_update
741+
requestBody:
742+
$ref: '#/components/requestBodies/Comment'
743+
responses:
744+
'200':
745+
description: ''
746+
content:
747+
application/json:
748+
schema:
749+
$ref: '#/components/schemas/Comment'
750+
'400':
751+
description: Invalid Request
752+
content:
753+
application/json:
754+
schema:
755+
$ref: '#/components/schemas/ErrorCommentUpdate'
756+
'403':
757+
description: Forbidden
758+
content:
759+
application/json:
760+
schema:
761+
$ref: '#/components/schemas/Error'
762+
'404':
763+
description: Not found
764+
content:
765+
application/json:
766+
schema:
767+
$ref: '#/components/schemas/Error'
768+
tags:
769+
- comments
638770
/api/patches/{patch_id}/checks/:
639771
parameters:
640772
- in: path
@@ -1242,6 +1374,12 @@ components:
12421374
application/x-www-form-urlencoded:
12431375
schema:
12441376
$ref: '#/components/schemas/CheckCreate'
1377+
Comment:
1378+
required: true
1379+
content:
1380+
application/json:
1381+
schema:
1382+
$ref: '#/components/schemas/CommentUpdate'
12451383
Patch:
12461384
required: true
12471385
content:
@@ -1528,6 +1666,15 @@ components:
15281666
additionalProperties:
15291667
type: string
15301668
readOnly: true
1669+
addressed:
1670+
title: Addressed
1671+
type: boolean
1672+
CommentUpdate:
1673+
type: object
1674+
properties:
1675+
addressed:
1676+
title: Addressed
1677+
type: boolean
15311678
CoverList:
15321679
type: object
15331680
properties:
@@ -1712,9 +1859,11 @@ components:
17121859
previous_relation:
17131860
title: Previous relation
17141861
type: string
1862+
nullable: true
17151863
current_relation:
17161864
title: Current relation
17171865
type: string
1866+
nullable: true
17181867
EventPatchDelegated:
17191868
allOf:
17201869
- $ref: '#/components/schemas/EventBase'
@@ -2555,6 +2704,14 @@ components:
25552704
items:
25562705
type: string
25572706
readOnly: true
2707+
ErrorCommentUpdate:
2708+
type: object
2709+
properties:
2710+
addressed:
2711+
title: Addressed
2712+
type: array
2713+
items:
2714+
type: string
25582715
ErrorPatchUpdate:
25592716
type: object
25602717
properties:

0 commit comments

Comments
 (0)