Files
notifications-api/app/platform_stats/platform_stats_schema.py
Katie Smith b4654781be Add schema and validate platform stats requests
Added a schema to check that the start_date and end_date arguments are
both in the date format.
2018-06-29 16:14:48 +01:00

11 lines
364 B
Python

platform_stats_request = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "platform stats request schema",
"type": "object",
"title": "Platform stats request",
"properties": {
"start_date": {"type": ["string", "null"], "format": "date"},
"end_date": {"type": ["string", "null"], "format": "date"},
}
}