Files
notifications-api/app/service/send_pdf_letter_schema.py
David McDonald d1195dfd5a Use json schema to validate post request to send PDF letter
This approach was suggested as the way to do validation things on
Notify.
2019-10-25 14:36:13 +01:00

15 lines
470 B
Python

send_pdf_letter_request = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "POST send uploaded pdf letter",
"type": "object",
"title": "Send an uploaded pdf letter",
"properties": {
"postage": {"enum": ["first", "second"]},
"filename": {"type": "string"},
"created_by": {"type": "string"},
"file_id": {"type": "string"},
},
"required": ["postage", "filename", "created_by", "file_id"]
}