Skip to content

Commit

Permalink
[#190] extract out va_identifier from notification schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
marisahoenig committed Oct 27, 2020
1 parent f6be4ce commit cfe4590
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions app/v2/notifications/notification_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@

}

va_identifier = {"type": "object", "properties": {
"id_type": {
"type": "string",
"enum": VA_IDENTIFIER_TYPES
},
"value": {
"type": "string"
}
}, "required": ["id_type", "value"]}

post_sms_request = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "POST sms notification schema",
Expand All @@ -134,15 +144,7 @@
"properties": {
"reference": {"type": "string"},
"phone_number": {"type": "string", "format": "phone_number"},
"va_identifier": {"type": "object", "properties": {
"id_type": {
"type": "string",
"enum": VA_IDENTIFIER_TYPES
},
"value": {
"type": "string"
}
}, "required": ["id_type", "value"]},
"va_identifier": va_identifier,
"template_id": uuid,
"personalisation": personalisation,
"scheduled_for": {"type": ["string", "null"], "format": "datetime_within_next_day"},
Expand Down Expand Up @@ -193,15 +195,7 @@
"properties": {
"reference": {"type": "string"},
"email_address": {"type": "string", "format": "email_address"},
"va_identifier": {"type": "object", "properties": {
"id_type": {
"type": "string",
"enum": VA_IDENTIFIER_TYPES
},
"value": {
"type": "string"
}
}, "required": ["id_type", "value"]},
"va_identifier": va_identifier,
"template_id": uuid,
"personalisation": personalisation,
"scheduled_for": {"type": ["string", "null"], "format": "datetime_within_next_day"},
Expand Down

0 comments on commit cfe4590

Please sign in to comment.