]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Resolve issues with 'covers'
authorStephen Finucane <stephen@that.guru>
Wed, 15 Apr 2020 23:51:17 +0000 (00:51 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 18 Apr 2020 10:57:28 +0000 (11:57 +0100)
Two issues to correct:

- Each header in the 'headers' field can be either a string or a list
  value.
- We state that the 'content' field will always have content but our
  tests were configuring otherwise.

Signed-off-by: Stephen Finucane <stephen@that.guru>
docs/api/schemas/latest/patchwork.yaml
docs/api/schemas/patchwork.j2
docs/api/schemas/v1.0/patchwork.yaml
docs/api/schemas/v1.1/patchwork.yaml
docs/api/schemas/v1.2/patchwork.yaml
patchwork/tests/utils.py

index 8d5acddba7ee9c702be625b5f02228f3d209d75e..0ebcbf4eb518d4e724df0b0b8cbf9f5e21c8b666 100644 (file)
@@ -1590,9 +1590,15 @@ components:
         - properties:
             headers:
               title: Headers
-              type: array
-              items:
-                type: string
+              anyOf:
+                - type: object
+                  additionalProperties:
+                    type: array
+                    items:
+                      type: string
+                - type: object
+                  additionalProperties:
+                    type: string
               readOnly: true
             content:
               title: Content
index 98ca16cc644a6d52d1949cdfeb098e1f3cea9d4b..56ecd83efaa167c73196bf29928db899c50596a9 100644 (file)
@@ -1656,9 +1656,15 @@ components:
         - properties:
             headers:
               title: Headers
-              type: array
-              items:
-                type: string
+              anyOf:
+                - type: object
+                  additionalProperties:
+                    type: array
+                    items:
+                      type: string
+                - type: object
+                  additionalProperties:
+                    type: string
               readOnly: true
             content:
               title: Content
index a2b1b858feb796b01c308f5a6a4bfcca75556569..680d4d6ef1d0424cea7fff9798b728d22e7f2e86 100644 (file)
@@ -1386,9 +1386,15 @@ components:
         - properties:
             headers:
               title: Headers
-              type: array
-              items:
-                type: string
+              anyOf:
+                - type: object
+                  additionalProperties:
+                    type: array
+                    items:
+                      type: string
+                - type: object
+                  additionalProperties:
+                    type: string
               readOnly: true
             content:
               title: Content
index dcec32efc6123902091dfce940b3e525a7b66288..d5e441f3d7379edfdf044e7f9b32b53af49875a8 100644 (file)
@@ -1411,9 +1411,15 @@ components:
         - properties:
             headers:
               title: Headers
-              type: array
-              items:
-                type: string
+              anyOf:
+                - type: object
+                  additionalProperties:
+                    type: array
+                    items:
+                      type: string
+                - type: object
+                  additionalProperties:
+                    type: string
               readOnly: true
             content:
               title: Content
index 0007cd265f464ad6c7b5af20a2ed84303ecd94f9..a6b811f02ce8421a7fe765be09a349c8ccd6d9e8 100644 (file)
@@ -1590,9 +1590,15 @@ components:
         - properties:
             headers:
               title: Headers
-              type: array
-              items:
-                type: string
+              anyOf:
+                - type: object
+                  additionalProperties:
+                    type: array
+                    items:
+                      type: string
+                - type: object
+                  additionalProperties:
+                    type: string
               readOnly: true
             content:
               title: Content
index 7759c8f37a300144e47780a8095e27a3e1d9ea58..1a7baa285a99588d690ccc394b64749daa474ad3 100644 (file)
@@ -228,7 +228,7 @@ def create_cover(**kwargs):
         'msgid': make_msgid(),
         'name': 'testpatch%d' % num,
         'headers': '',
-        'content': '',
+        'content': 'foo',
     }
     values.update(kwargs)