aboutsummaryrefslogtreecommitdiff
path: root/docs/api/schemas/v1.1/patchwork.yaml
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2020-04-15 23:37:17 +0100
committerStephen Finucane <stephen@that.guru>2020-04-18 11:57:28 +0100
commitb4d77239c20f788fe65d71953b2889ebfa105397 (patch)
tree43ce336be18094189cad27c2227b2ca168ee9bb4 /docs/api/schemas/v1.1/patchwork.yaml
parent167079a5335b36a60b6cf02e57e69c24216103f3 (diff)
downloadpatchwork-b4d77239c20f788fe65d71953b2889ebfa105397.tar
patchwork-b4d77239c20f788fe65d71953b2889ebfa105397.tar.gz
docs: Make embedded fields nullable by default
As discussed at [1], "subtypes can add restrictions, but they cannot relax restrictions that are already in place." These fields need to be marked nullable and then "subclassed" to set non-nullability if required. [1] https://github.com/OAI/OpenAPI-Specification/issues/1368 Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'docs/api/schemas/v1.1/patchwork.yaml')
-rw-r--r--docs/api/schemas/v1.1/patchwork.yaml2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/api/schemas/v1.1/patchwork.yaml b/docs/api/schemas/v1.1/patchwork.yaml
index 6b497ab..43034fa 100644
--- a/docs/api/schemas/v1.1/patchwork.yaml
+++ b/docs/api/schemas/v1.1/patchwork.yaml
@@ -1253,6 +1253,7 @@ components:
type: object
title: Owner
readOnly: true
+ nullable: false
allOf:
- $ref: '#/components/schemas/UserEmbedded'
patches:
@@ -2231,6 +2232,7 @@ components:
readOnly: true
UserEmbedded:
type: object
+ nullable: true
properties:
id:
title: ID