Refactor to use query string rather than path params

This commit is contained in:
Ken Tsang
2017-11-07 16:39:11 +00:00
parent ac15e7fd8b
commit dca331e3ea
4 changed files with 68 additions and 71 deletions

View File

@@ -1,6 +1,18 @@
from app.schema_validation.definitions import uuid
get_inbound_sms_request = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "schema for query parameters allowed when getting list of received text messages",
"type": "object",
"properties": {
"older_than": uuid,
"user_number": {"type": "string"}
},
"additionalProperties": False,
}
get_inbound_sms_single_response = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "GET inbound sms schema response",
@@ -29,6 +41,7 @@ get_inbound_sms_single_response = {
"user_number", "created_at", "service_id",
"notify_number", "content"
],
"additionalProperties": False,
}
get_inbound_sms_response = {
@@ -60,5 +73,6 @@ get_inbound_sms_response = {
"required": ["received_text_messages", "links"],
"definitions": {
"inbound_sms": get_inbound_sms_single_response
}
},
"additionalProperties": False,
}