]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Document the '/covers/{id}/comments' resource
authorStephen Finucane <stephen@that.guru>
Fri, 26 Oct 2018 21:16:04 +0000 (22:16 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 22 Dec 2018 17:19:07 +0000 (17:19 +0000)
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@that.guru>
docs/api/schemas/patchwork.yaml

index b533424fb199444a6f0f7acbd65baf9d67990d42..931280f0ced7f6460bdb16002945ed15d804ab71 100644 (file)
@@ -163,6 +163,42 @@ 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:
+                type: array
+                items:
+                  $ref: '#/components/schemas/Comment'
+        '404':
+          description: 'Not found'
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Error'
+      tags:
+      - comments
   /api/patches/:
     get:
       description: List patches.
@@ -941,6 +977,49 @@ components:
           type: string
           format: uri
           readOnly: true
+    Comment:
+      type: object
+      properties:
+        id:
+          title: ID
+          type: integer
+          readOnly: true
+        web_url:
+          title: Web URL
+          type: string
+          format: uri
+          readOnly: true
+        msgid:
+          title: Message ID
+          type: string
+          readOnly: true
+          minLength: 1
+          maxLength: 255
+        date:
+          title: Date
+          type: string
+          format: iso8601
+          readOnly: true
+        subject:
+          title: Subject
+          type: string
+          readOnly: true
+        submitter:
+          type: object
+          title: Submitter
+          allOf:
+          - $ref: '#/components/schemas/PersonEmbedded'
+        content:
+          title: Content
+          type: string
+          readOnly: true
+          minLength: 1
+        headers:
+          title: Headers
+          type: array
+          items:
+            type: string
+          readOnly: true
     CoverLetterList:
       type: object
       properties: