mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-17 04:58:50 -04: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:
@@ -2,7 +2,7 @@ from app.models import INVITED_USER_STATUS_TYPES, ORGANISATION_TYPES
|
||||
from app.schema_validation.definitions import uuid
|
||||
|
||||
post_create_organisation_schema = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST organisation schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -15,7 +15,7 @@ post_create_organisation_schema = {
|
||||
}
|
||||
|
||||
post_update_organisation_schema = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST organisation schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -28,7 +28,7 @@ post_update_organisation_schema = {
|
||||
}
|
||||
|
||||
post_link_service_to_organisation_schema = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST link service to organisation schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -39,7 +39,7 @@ post_link_service_to_organisation_schema = {
|
||||
|
||||
|
||||
post_create_invited_org_user_status_schema = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST create organisation invite schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -52,7 +52,7 @@ post_create_invited_org_user_status_schema = {
|
||||
|
||||
|
||||
post_update_invited_org_user_status_schema = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST update organisation invite schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user