mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
We were using the Draft4Validator in one place, so this updates it to the Draft7Validator instead. The schemas were mostly using draft 4 of the JSON schema, though there were a couple of schemas that were already of version 7. This updates them all to version 7, which is the latest version fully supported by the jsonschema Python package. There are some breaking changes in the newer version of the schema, but I could not see anywhere would these affect us. Some of these schemas were not valid in version 4, but are now valid in version 7 because `"required": []` was not valid in earlier versions.
41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
from app.schema_validation.definitions import uuid
|
|
|
|
add_service_email_reply_to_request = {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"description": "POST service email reply to address",
|
|
"type": "object",
|
|
"title": "Add new email reply to address for service",
|
|
"properties": {
|
|
"email_address": {"type": "string", "format": "email_address"},
|
|
"is_default": {"type": "boolean"}
|
|
},
|
|
"required": ["email_address", "is_default"]
|
|
}
|
|
|
|
|
|
add_service_letter_contact_block_request = {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"description": "POST service letter contact block",
|
|
"type": "object",
|
|
"title": "Add new letter contact block for service",
|
|
"properties": {
|
|
"contact_block": {"type": "string"},
|
|
"is_default": {"type": "boolean"}
|
|
},
|
|
"required": ["contact_block", "is_default"]
|
|
}
|
|
|
|
|
|
add_service_sms_sender_request = {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"description": "POST add service SMS sender",
|
|
"type": "object",
|
|
"title": "Add new SMS sender for service",
|
|
"properties": {
|
|
"sms_sender": {"type": "string"},
|
|
"is_default": {"type": "boolean"},
|
|
"inbound_number_id": uuid
|
|
},
|
|
"required": ["sms_sender", "is_default"]
|
|
}
|