From: Stephen Finucane Date: Wed, 15 Apr 2020 23:51:17 +0000 (+0100) Subject: docs: Resolve issues with 'covers' X-Git-Tag: v3.0.0~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9da843141155c1f0835f671bc473e7c7424244e3;p=thirdparty%2Fpatchwork.git docs: Resolve issues with 'covers' 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 --- diff --git a/docs/api/schemas/latest/patchwork.yaml b/docs/api/schemas/latest/patchwork.yaml index 8d5acddb..0ebcbf4e 100644 --- a/docs/api/schemas/latest/patchwork.yaml +++ b/docs/api/schemas/latest/patchwork.yaml @@ -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 diff --git a/docs/api/schemas/patchwork.j2 b/docs/api/schemas/patchwork.j2 index 98ca16cc..56ecd83e 100644 --- a/docs/api/schemas/patchwork.j2 +++ b/docs/api/schemas/patchwork.j2 @@ -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 diff --git a/docs/api/schemas/v1.0/patchwork.yaml b/docs/api/schemas/v1.0/patchwork.yaml index a2b1b858..680d4d6e 100644 --- a/docs/api/schemas/v1.0/patchwork.yaml +++ b/docs/api/schemas/v1.0/patchwork.yaml @@ -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 diff --git a/docs/api/schemas/v1.1/patchwork.yaml b/docs/api/schemas/v1.1/patchwork.yaml index dcec32ef..d5e441f3 100644 --- a/docs/api/schemas/v1.1/patchwork.yaml +++ b/docs/api/schemas/v1.1/patchwork.yaml @@ -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 diff --git a/docs/api/schemas/v1.2/patchwork.yaml b/docs/api/schemas/v1.2/patchwork.yaml index 0007cd26..a6b811f0 100644 --- a/docs/api/schemas/v1.2/patchwork.yaml +++ b/docs/api/schemas/v1.2/patchwork.yaml @@ -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 diff --git a/patchwork/tests/utils.py b/patchwork/tests/utils.py index 7759c8f3..1a7baa28 100644 --- a/patchwork/tests/utils.py +++ b/patchwork/tests/utils.py @@ -228,7 +228,7 @@ def create_cover(**kwargs): 'msgid': make_msgid(), 'name': 'testpatch%d' % num, 'headers': '', - 'content': '', + 'content': 'foo', } values.update(kwargs)