mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-25 20:12:54 -05:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user