mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Use Draft-07 and Draft7Validator everywhere
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.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
send_pdf_letter_request = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST send uploaded pdf letter",
|
||||
"type": "object",
|
||||
"title": "Send an uploaded pdf letter",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
service_broadcast_settings_schema = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Set a services broadcast settings",
|
||||
"type": "object",
|
||||
"title": "Set a services broadcast settings",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from app.schema_validation.definitions import https_url, uuid
|
||||
|
||||
create_service_callback_api_schema = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST service callback/inbound api schema",
|
||||
"type": "object",
|
||||
"title": "Create service callback/inbound api",
|
||||
@@ -14,7 +14,7 @@ create_service_callback_api_schema = {
|
||||
}
|
||||
|
||||
update_service_callback_api_schema = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST service callback/inbound api schema",
|
||||
"type": "object",
|
||||
"title": "Create service callback/inbound api",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from app.schema_validation.definitions import uuid
|
||||
|
||||
create_service_contact_list_schema = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST create service contact list schema",
|
||||
"type": "object",
|
||||
"title": "Create service contact list",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
add_service_data_retention_request = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST service data retention schema",
|
||||
"title": "Add service data retention for notification type api",
|
||||
"type": "object",
|
||||
@@ -12,7 +12,7 @@ add_service_data_retention_request = {
|
||||
|
||||
|
||||
update_service_data_retention_request = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST service data retention schema",
|
||||
"title": "Update service data retention for notification type api",
|
||||
"type": "object",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from app.schema_validation.definitions import uuid
|
||||
|
||||
add_service_email_reply_to_request = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$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",
|
||||
@@ -14,7 +14,7 @@ add_service_email_reply_to_request = {
|
||||
|
||||
|
||||
add_service_letter_contact_block_request = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST service letter contact block",
|
||||
"type": "object",
|
||||
"title": "Add new letter contact block for service",
|
||||
@@ -27,7 +27,7 @@ add_service_letter_contact_block_request = {
|
||||
|
||||
|
||||
add_service_sms_sender_request = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST add service SMS sender",
|
||||
"type": "object",
|
||||
"title": "Add new SMS sender for service",
|
||||
|
||||
Reference in New Issue
Block a user