[PATCH 11/17] docs: Document the '/patches' resource
Stephen Finucane
stephen at that.guru
Tue Oct 30 22:19:10 AEDT 2018
The big one (TM). Nothing too odd here though.
Signed-off-by: Stephen Finucane <stephen at that.guru>
---
docs/api/schemas/patchwork.yaml | 351 ++++++++++++++++++++++++++++++++
1 file changed, 351 insertions(+)
diff --git a/docs/api/schemas/patchwork.yaml b/docs/api/schemas/patchwork.yaml
index 3cadd35a..0763bd50 100644
--- a/docs/api/schemas/patchwork.yaml
+++ b/docs/api/schemas/patchwork.yaml
@@ -163,6 +163,186 @@ paths:
$ref: '#/components/schemas/Error'
tags:
- covers
+ /api/patches/:
+ get:
+ description: List patches.
+ operationId: patches_list
+ parameters:
+ - $ref: '#/components/parameters/Page'
+ - $ref: '#/components/parameters/PageSize'
+ - $ref: '#/components/parameters/Order'
+ - $ref: '#/components/parameters/Search'
+ - $ref: '#/components/parameters/BeforeFilter'
+ - $ref: '#/components/parameters/SinceFilter'
+ - in: query
+ name: project
+ schema:
+ description: ''
+ title: ''
+ type: string
+ - in: query
+ name: series
+ schema:
+ description: ''
+ title: ''
+ type: string
+ - in: query
+ name: submitter
+ schema:
+ description: ''
+ title: ''
+ type: string
+ - in: query
+ name: delegate
+ schema:
+ description: ''
+ title: ''
+ type: string
+ - in: query
+ name: state
+ schema:
+ description: ''
+ title: ''
+ type: string
+ - in: query
+ name: archived
+ schema:
+ description: ''
+ title: ''
+ type: string
+ responses:
+ '200':
+ description: ''
+ headers:
+ Link:
+ $ref: '#/components/headers/Link'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchList'
+ tags:
+ - patches
+ /api/patches/{id}/:
+ get:
+ description: Show a patch.
+ operationId: patches_read
+ parameters:
+ - in: path
+ name: id
+ required: true
+ schema:
+ description: ''
+ title: ''
+ type: string
+ tags:
+ - patches
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchDetail'
+ '403':
+ description: 'Forbidden'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ '404':
+ description: 'Not found'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ patch:
+ description: Update a patch (partial).
+ operationId: patches_partial_update
+ parameters:
+ - in: path
+ name: id
+ required: true
+ schema:
+ description: ''
+ title: ''
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchUpdate'
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchDetail'
+ '400':
+ description: 'Invalid Request'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorPatchUpdate'
+ '403':
+ description: 'Forbidden'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ '404':
+ description: 'Not found'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ tags:
+ - patches
+ put:
+ description: Update a patch.
+ operationId: patches_update
+ parameters:
+ - in: path
+ name: id
+ required: true
+ schema:
+ description: ''
+ title: ''
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchUpdate'
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchDetail'
+ '400':
+ description: 'Invalid Request'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorPatchUpdate'
+ '403':
+ description: 'Forbidden'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ '404':
+ description: 'Not found'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ tags:
+ - patches
/api/people/:
get:
description: List people.
@@ -701,6 +881,158 @@ components:
type: string
readOnly: true
minLength: 1
+ PatchList:
+ required:
+ - state
+ - delegate
+ type: object
+ properties:
+ id:
+ title: ID
+ type: integer
+ readOnly: true
+ url:
+ title: Url
+ type: string
+ format: uri
+ readOnly: true
+ web_url:
+ title: Web url
+ type: string
+ format: uri
+ readOnly: true
+ project:
+ $ref: '#/components/schemas/ProjectEmbedded'
+ msgid:
+ title: Msgid
+ type: string
+ readOnly: true
+ minLength: 1
+ date:
+ title: Date
+ type: string
+ format: date-time
+ readOnly: true
+ name:
+ title: Name
+ type: string
+ readOnly: true
+ minLength: 1
+ commit_ref:
+ title: Commit ref
+ type: string
+ maxLength: 255
+ x-nullable: true
+ pull_url:
+ title: Pull URL
+ type: string
+ format: uri
+ maxLength: 255
+ x-nullable: true
+ state:
+ title: State
+ type: string
+ archived:
+ title: Archived
+ type: boolean
+ hash:
+ title: Hash
+ type: string
+ readOnly: true
+ minLength: 1
+ submitter:
+ allOf:
+ - $ref: '#/components/schemas/User'
+ - title: Submitter
+ - readOnly: true
+ delegate:
+ allOf:
+ - $ref: '#/components/schemas/User'
+ - title: Delegate
+ mbox:
+ title: Mbox
+ type: string
+ format: uri
+ readOnly: true
+ series:
+ $ref: '#/components/schemas/SeriesEmbedded'
+ comments:
+ title: Comments
+ type: string
+ format: uri
+ readOnly: true
+ check:
+ title: Check
+ type: string
+ readOnly: true
+ enum:
+ - pending
+ - success
+ - warning
+ - fail
+ checks:
+ title: Checks
+ type: string
+ format: uri
+ readOnly: true
+ tags:
+ title: Tags
+ type: array
+ items:
+ type: string
+ readOnly: true
+ PatchDetail:
+ allOf:
+ - $ref: '#/components/schemas/PatchList'
+ - properties:
+ headers:
+ title: Headers
+ type: array
+ items:
+ type: string
+ readOnly: true
+ content:
+ title: Content
+ type: string
+ readOnly: true
+ minLength: 1
+ diff:
+ title: Diff
+ type: string
+ readOnly: true
+ minLength: 1
+ prefixes:
+ title: Prefixes
+ type: array
+ items:
+ type: string
+ readOnly: true
+ PatchUpdate:
+ required:
+ - state
+ - delegate
+ type: object
+ properties:
+ commit_ref:
+ title: Commit ref
+ type: string
+ maxLength: 255
+ x-nullable: true
+ pull_url:
+ title: Pull URL
+ type: string
+ format: uri
+ maxLength: 255
+ x-nullable: true
+ state:
+ title: State
+ type: string
+ archived:
+ title: Archived
+ type: boolean
+ delegate:
+ title: Delegate
+ type: integer
Person:
type: object
properties:
@@ -1020,6 +1352,25 @@ components:
title: Detail
type: string
readOnly: true
+ ErrorPatchUpdate:
+ type: object
+ properties:
+ state:
+ title: State
+ type: string
+ readOnly: true
+ delegate:
+ title: Delegate
+ type: string
+ readOnly: true
+ commit_ref:
+ title: Commit ref
+ type: string
+ readOnly: true
+ archived:
+ title: Archived
+ type: string
+ readOnly: true
ErrorProjectUpdate:
type: object
properties:
--
2.17.2
More information about the Patchwork
mailing list