mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Use json schema to validate post request to send PDF letter
This approach was suggested as the way to do validation things on Notify.
This commit is contained in:
14
app/service/send_pdf_letter_schema.py
Normal file
14
app/service/send_pdf_letter_schema.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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"]
|
||||
}
|
||||
Reference in New Issue
Block a user