From ffb3153a47f7b9365f8bf255514dd7b0bde7d547 Mon Sep 17 00:00:00 2001 From: profitroll Date: Mon, 8 May 2023 19:27:33 +0200 Subject: [PATCH] WIP: Analytics validation --- validation/analytics.json | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 validation/analytics.json diff --git a/validation/analytics.json b/validation/analytics.json new file mode 100644 index 0000000..d07f175 --- /dev/null +++ b/validation/analytics.json @@ -0,0 +1,54 @@ +{ + "$jsonSchema": { + "required": [ + "user", + "channel", + "content", + "stickers", + "attachments" + ], + "properties": { + "user": { + "bsonType": "long", + "description": "Discord ID of user" + }, + "channel": { + "bsonType": "int", + "description": "Discord ID of a channel" + }, + "content": { + "bsonType": ["null", "string"], + "description": "Text of the message" + }, + "stickers": { + "bsonType": "array", + "items": { + "bsonType": "object", + "required": [ + "id", + "name", + "format", + "url" + ], + "properties": { + "id": { + "bsonType": "int" + }, + "name": { + "bsonType": "string" + }, + "format": { + "bsonType": "array" + }, + "user": { + "bsonType": "string" + } + } + } + }, + "attachments": { + "bsonType": "array" + } + } + } +} \ No newline at end of file