[PATCH 10/17] docs: Document the '/covers' resource
Stephen Finucane
stephen at that.guru
Tue Oct 30 22:19:09 AEDT 2018
Again, we're adding embedded serializers before the main resource but
that will come.
Signed-off-by: Stephen Finucane <stephen at that.guru>
---
docs/api/schemas/patchwork.yaml | 210 ++++++++++++++++++++++++++++++++
1 file changed, 210 insertions(+)
diff --git a/docs/api/schemas/patchwork.yaml b/docs/api/schemas/patchwork.yaml
index c5c29b50..3cadd35a 100644
--- a/docs/api/schemas/patchwork.yaml
+++ b/docs/api/schemas/patchwork.yaml
@@ -93,6 +93,76 @@ paths:
$ref: '#/components/schemas/Error'
tags:
- bundles
+ /api/covers/:
+ get:
+ description: List cover letters.
+ operationId: covers_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
+ responses:
+ '200':
+ description: ''
+ headers:
+ Link:
+ $ref: '#/components/headers/Link'
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/CoverLetterList'
+ tags:
+ - covers
+ /api/covers/{id}/:
+ get:
+ description: Show a cover letter.
+ operationId: covers_read
+ parameters:
+ - in: path
+ name: id
+ required: true
+ schema:
+ description: ''
+ title: ''
+ type: string
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CoverLetterDetail'
+ '404':
+ description: 'Not found'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ tags:
+ - covers
/api/people/:
get:
description: List people.
@@ -462,6 +532,20 @@ components:
description: A search term.
title: Search
type: string
+ BeforeFilter:
+ in: query
+ name: before
+ schema:
+ description: ''
+ title: ''
+ type: string
+ SinceFilter:
+ in: query
+ name: since
+ schema:
+ description: ''
+ title: ''
+ type: string
headers:
Link:
description: |
@@ -554,6 +638,69 @@ components:
type: string
format: uri
readOnly: true
+ CoverLetterList:
+ 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
+ submitter:
+ $ref: '#/components/schemas/PersonEmbedded'
+ mbox:
+ title: Mbox
+ type: string
+ format: uri
+ readOnly: true
+ series:
+ $ref: '#/components/schemas/SeriesEmbedded'
+ comments:
+ title: Comments
+ type: string
+ format: uri
+ readOnly: true
+ CoverLetterDetail:
+ allOf:
+ - $ref: '#/components/schemas/CoverLetterList'
+ - properties:
+ headers:
+ title: Headers
+ type: array
+ items:
+ type: string
+ readOnly: true
+ content:
+ title: Content
+ type: string
+ readOnly: true
+ minLength: 1
Person:
type: object
properties:
@@ -715,6 +862,29 @@ components:
type: string
format: uri
readOnly: true
+ PersonEmbedded:
+ type: object
+ properties:
+ id:
+ title: ID
+ type: integer
+ readOnly: true
+ url:
+ title: Url
+ type: string
+ format: uri
+ readOnly: true
+ name:
+ title: Name
+ type: string
+ readOnly: true
+ minLength: 1
+ email:
+ title: Email
+ type: string
+ format: email
+ readOnly: true
+ minLength: 1
ProjectEmbedded:
type: object
properties:
@@ -769,6 +939,46 @@ components:
format: uri
readOnly: true
maxLength: 2000
+ SeriesEmbedded:
+ 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
+ name:
+ title: Name
+ description: An optional name to associate with the series, e.g. "John's PCI
+ series".
+ type: string
+ readOnly: true
+ maxLength: 255
+ x-nullable: true
+ date:
+ title: Date
+ type: string
+ format: date-time
+ readOnly: true
+ version:
+ title: Version
+ description: Version of series as indicated by the subject prefix(es)
+ type: integer
+ readOnly: true
+ mbox:
+ title: Mbox
+ type: string
+ format: uri
+ readOnly: true
UserEmbedded:
type: object
properties:
--
2.17.2
More information about the Patchwork
mailing list