mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 07:51:13 -05:00
Require reference if template not provided
In the admin app we need something to use in show in lieu of template name when a template isn’t used. Let’s store this in the reference field for now.
This commit is contained in:
@@ -16,11 +16,18 @@ create_broadcast_message_schema = {
|
||||
'areas': {"type": "array", "items": {"type": "string"}},
|
||||
'simple_polygons': {"type": "array", "items": {"type": "array"}},
|
||||
'content': {'type': 'string', 'minLength': 1, 'maxLength': 1395},
|
||||
'reference': {'type': 'string', 'minLength': 1, 'maxLength': 255},
|
||||
},
|
||||
'required': ['service_id', 'created_by'],
|
||||
'oneOf': [
|
||||
{'required': ['template_id']},
|
||||
{'required': ['content']},
|
||||
'allOf': [
|
||||
{'oneOf': [
|
||||
{'required': ['template_id']},
|
||||
{'required': ['content']},
|
||||
]},
|
||||
{'oneOf': [
|
||||
{'required': ['template_id']},
|
||||
{'required': ['reference']},
|
||||
]},
|
||||
],
|
||||
'additionalProperties': False
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user