Skip to content

Commit 9da8431

Browse files
committed
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 <[email protected]>
1 parent cdcecca commit 9da8431

File tree

6 files changed

+46
-16
lines changed

6 files changed

+46
-16
lines changed

docs/api/schemas/latest/patchwork.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,9 +1590,15 @@ components:
15901590
- properties:
15911591
headers:
15921592
title: Headers
1593-
type: array
1594-
items:
1595-
type: string
1593+
anyOf:
1594+
- type: object
1595+
additionalProperties:
1596+
type: array
1597+
items:
1598+
type: string
1599+
- type: object
1600+
additionalProperties:
1601+
type: string
15961602
readOnly: true
15971603
content:
15981604
title: Content

docs/api/schemas/patchwork.j2

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,9 +1656,15 @@ components:
16561656
- properties:
16571657
headers:
16581658
title: Headers
1659-
type: array
1660-
items:
1661-
type: string
1659+
anyOf:
1660+
- type: object
1661+
additionalProperties:
1662+
type: array
1663+
items:
1664+
type: string
1665+
- type: object
1666+
additionalProperties:
1667+
type: string
16621668
readOnly: true
16631669
content:
16641670
title: Content

docs/api/schemas/v1.0/patchwork.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,9 +1386,15 @@ components:
13861386
- properties:
13871387
headers:
13881388
title: Headers
1389-
type: array
1390-
items:
1391-
type: string
1389+
anyOf:
1390+
- type: object
1391+
additionalProperties:
1392+
type: array
1393+
items:
1394+
type: string
1395+
- type: object
1396+
additionalProperties:
1397+
type: string
13921398
readOnly: true
13931399
content:
13941400
title: Content

docs/api/schemas/v1.1/patchwork.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,9 +1411,15 @@ components:
14111411
- properties:
14121412
headers:
14131413
title: Headers
1414-
type: array
1415-
items:
1416-
type: string
1414+
anyOf:
1415+
- type: object
1416+
additionalProperties:
1417+
type: array
1418+
items:
1419+
type: string
1420+
- type: object
1421+
additionalProperties:
1422+
type: string
14171423
readOnly: true
14181424
content:
14191425
title: Content

docs/api/schemas/v1.2/patchwork.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,9 +1590,15 @@ components:
15901590
- properties:
15911591
headers:
15921592
title: Headers
1593-
type: array
1594-
items:
1595-
type: string
1593+
anyOf:
1594+
- type: object
1595+
additionalProperties:
1596+
type: array
1597+
items:
1598+
type: string
1599+
- type: object
1600+
additionalProperties:
1601+
type: string
15961602
readOnly: true
15971603
content:
15981604
title: Content

patchwork/tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def create_cover(**kwargs):
228228
'msgid': make_msgid(),
229229
'name': 'testpatch%d' % num,
230230
'headers': '',
231-
'content': '',
231+
'content': 'foo',
232232
}
233233
values.update(kwargs)
234234

0 commit comments

Comments
 (0)