aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2019-04-30 02:57:01 +1000
committerDaniel Axtens <dja@axtens.net>2019-04-30 15:20:57 +1000
commit7a20ccda99e48dab643d1fbd7e170fe3e4c47185 (patch)
treeb15c52e451de569faed8c703c89dc3f78e7e452e /docs
parent666de29ebada5990a8d69f4d71d6bb271e1a68c3 (diff)
downloadpatchwork-7a20ccda99e48dab643d1fbd7e170fe3e4c47185.tar
patchwork-7a20ccda99e48dab643d1fbd7e170fe3e4c47185.tar.gz
REST: A check must specify a state
The Ozlabs crew noticed that a check without a state caused a KeyError in data['state']. Mark state as mandatory, check for it, and add a test. Reported-by: Russell Currey <ruscur@russell.cc> Reported-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Daniel Axtens <dja@axtens.net>
Diffstat (limited to 'docs')
-rw-r--r--docs/api/schemas/latest/patchwork.yaml2
-rw-r--r--docs/api/schemas/patchwork.j22
-rw-r--r--docs/api/schemas/v1.0/patchwork.yaml2
-rw-r--r--docs/api/schemas/v1.1/patchwork.yaml2
4 files changed, 8 insertions, 0 deletions
diff --git a/docs/api/schemas/latest/patchwork.yaml b/docs/api/schemas/latest/patchwork.yaml
index e3ba69c..724b05e 100644
--- a/docs/api/schemas/latest/patchwork.yaml
+++ b/docs/api/schemas/latest/patchwork.yaml
@@ -1316,6 +1316,8 @@ components:
nullable: true
CheckCreate:
type: object
+ required:
+ - state
properties:
state:
title: State
diff --git a/docs/api/schemas/patchwork.j2 b/docs/api/schemas/patchwork.j2
index 7d34863..5e2f5e4 100644
--- a/docs/api/schemas/patchwork.j2
+++ b/docs/api/schemas/patchwork.j2
@@ -1319,6 +1319,8 @@ components:
nullable: true
CheckCreate:
type: object
+ required:
+ - state
properties:
state:
title: State
diff --git a/docs/api/schemas/v1.0/patchwork.yaml b/docs/api/schemas/v1.0/patchwork.yaml
index 11e3ae3..02f3a15 100644
--- a/docs/api/schemas/v1.0/patchwork.yaml
+++ b/docs/api/schemas/v1.0/patchwork.yaml
@@ -1311,6 +1311,8 @@ components:
nullable: true
CheckCreate:
type: object
+ required:
+ - state
properties:
state:
title: State
diff --git a/docs/api/schemas/v1.1/patchwork.yaml b/docs/api/schemas/v1.1/patchwork.yaml
index 4e81ac3..0c086ed 100644
--- a/docs/api/schemas/v1.1/patchwork.yaml
+++ b/docs/api/schemas/v1.1/patchwork.yaml
@@ -1316,6 +1316,8 @@ components:
nullable: true
CheckCreate:
type: object
+ required:
+ - state
properties:
state:
title: State