Add get_notifications json schema + tests

Add a schema that corresponds to our response for returning lists
of notifications, and test with a contract test.
This commit is contained in:
Paul Craig
2016-11-25 16:46:19 +00:00
parent df7450698c
commit ffb813bb3f
2 changed files with 42 additions and 1 deletions

View File

@@ -72,6 +72,36 @@ get_notification_response = {
]
}
get_notifications_response = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "GET list of notifications response schema",
"type": "object",
"properties": {
"notifications": {
"type": "array",
"items": {
"type": "object",
"ref": get_notification_response
}
},
"links": {
"type": "object",
"properties": {
"current": {
"type": "string"
},
"next": {
"type": "string"
}
},
"additionalProperties": False,
"required": ["current"]
}
},
"additionalProperties": False,
"required": ["notifications", "links"]
}
post_sms_request = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "POST sms notification schema",