mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -05:00
Update get_template_by_id_response & post_template_preview_response schemas
To check the format of postage. Neither of these two schemas are used for validating - they seem to be added for reference.
This commit is contained in:
@@ -37,7 +37,7 @@ get_template_by_id_response = {
|
|||||||
"body": {"type": "string"},
|
"body": {"type": "string"},
|
||||||
"subject": {"type": ["string", "null"]},
|
"subject": {"type": ["string", "null"]},
|
||||||
"name": {"type": "string"},
|
"name": {"type": "string"},
|
||||||
"postage": {"type": "string"}
|
"postage": {"type": "string", "format": "postage"}
|
||||||
},
|
},
|
||||||
"required": ["id", "type", "created_at", "updated_at", "version", "created_by", "body", "name"],
|
"required": ["id", "type", "created_at", "updated_at", "version", "created_by", "body", "name"],
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ post_template_preview_response = {
|
|||||||
"version": {"type": "integer"},
|
"version": {"type": "integer"},
|
||||||
"body": {"type": "string"},
|
"body": {"type": "string"},
|
||||||
"subject": {"type": ["string", "null"]},
|
"subject": {"type": ["string", "null"]},
|
||||||
"postage": {"type": "string"},
|
"postage": {"type": "string", "format": "postage"},
|
||||||
"html": {"type": ["string", "null"]},
|
"html": {"type": ["string", "null"]},
|
||||||
},
|
},
|
||||||
"required": ["id", "type", "version", "body"],
|
"required": ["id", "type", "version", "body"],
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ valid_json_get_response_with_optionals = {
|
|||||||
'body': 'some body',
|
'body': 'some body',
|
||||||
'subject': "some subject",
|
'subject': "some subject",
|
||||||
'name': 'some name',
|
'name': 'some name',
|
||||||
|
'postage': 'first',
|
||||||
}
|
}
|
||||||
|
|
||||||
valid_request_args = [{"id": str(uuid.uuid4()), "version": 1}, {"id": str(uuid.uuid4())}]
|
valid_request_args = [{"id": str(uuid.uuid4()), "version": 1}, {"id": str(uuid.uuid4())}]
|
||||||
@@ -80,6 +81,7 @@ valid_json_post_response_with_optionals = {
|
|||||||
'version': 1,
|
'version': 1,
|
||||||
'body': "some body",
|
'body': "some body",
|
||||||
'subject': 'some subject',
|
'subject': 'some subject',
|
||||||
|
'postage': 'second',
|
||||||
'html': '<p>some body</p>',
|
'html': '<p>some body</p>',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user