[PATCH 13/17] docs: Document the '/covers/{coverID}/comments' resource

Stephen Finucane stephen at that.guru
Tue Oct 30 22:19:12 AEDT 2018


Our first nested resource. Nothing too weird here though, save for the
raising of a HTTP 404 on a list resource (due to a missing patch).

Signed-off-by: Stephen Finucane <stephen at that.guru>
---
 docs/api/schemas/patchwork.yaml | 75 +++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/docs/api/schemas/patchwork.yaml b/docs/api/schemas/patchwork.yaml
index be5834a3..d9044624 100644
--- a/docs/api/schemas/patchwork.yaml
+++ b/docs/api/schemas/patchwork.yaml
@@ -163,6 +163,40 @@ paths:
                 $ref: '#/components/schemas/Error'
       tags:
       - covers
+  /api/covers/{id}/comments/:
+    get:
+      description: List comments
+      operationId: cover_comments_list
+      parameters:
+      - in: path
+        name: id
+        required: true
+        schema:
+          description: ''
+          title: ''
+          type: string
+      - $ref: '#/components/parameters/Page'
+      - $ref: '#/components/parameters/PageSize'
+      - $ref: '#/components/parameters/Order'
+      - $ref: '#/components/parameters/Search'
+      responses:
+        '200':
+          description: ''
+          headers:
+            Link:
+              $ref: '#/components/headers/Link'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/CommentList'
+        '404':
+          description: 'Not found'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Error'
+      tags:
+      - comments
   /api/patches/:
     get:
       description: List patches.
@@ -882,6 +916,47 @@ components:
           type: string
           format: uri
           readOnly: true
+    CommentList:
+      type: object
+      properties:
+        id:
+          title: ID
+          type: integer
+          readOnly: true
+        web_url:
+          title: Web url
+          type: string
+          format: uri
+          readOnly: true
+        msgid:
+          title: Msgid
+          type: string
+          readOnly: true
+          minLength: 1
+        date:
+          title: Date
+          type: string
+          format: date-time
+          readOnly: true
+        subject:
+          title: Subject
+          type: string
+          readOnly: true
+        submitter:
+          allOf:
+            - $ref: '#/components/schemas/User'
+            - title: Submitter
+        content:
+          title: Content
+          type: string
+          readOnly: true
+          minLength: 1
+        headers:
+          title: Headers
+          type: array
+          items:
+            type: string
+          readOnly: true
     CoverLetterList:
       type: object
       properties:
-- 
2.17.2



More information about the Patchwork mailing list