summaryrefslogtreecommitdiff
path: root/src/schema.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/schema.py')
-rw-r--r--src/schema.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/schema.py b/src/schema.py
index 9bdf130..fe2b76c 100644
--- a/src/schema.py
+++ b/src/schema.py
@@ -20,7 +20,7 @@ schema = {
"ptr": {"type": "string"},
"abuse_mail": {"type": "string"},
"domain": {"type": "string"},
- "timestamp_in_utc": {"type": "string"},
+ "timestamp": {"type": "string", "format": "date-time"},
"display_name": {"type": "string"},
"description": {"type": "string"},
"custom_data": {
@@ -85,7 +85,7 @@ schema = {
"ptr",
"abuse_mail",
"domain",
- "timestamp_in_utc",
+ "timestamp",
"display_name",
# "description",
# "custom_data",
@@ -122,7 +122,7 @@ def as_index_list():
def validate_collector_data(json_blob):
try:
- jsonschema.validate(json_blob, schema)
+ jsonschema.validate(json_blob, schema, format_checker=jsonschema.FormatChecker())
except jsonschema.exceptions.ValidationError as e:
return f"Validation failed with error: {e.message}"
return ""