From 4a2e15c6e7d9d4df054058853faabc35a21068fe Mon Sep 17 00:00:00 2001 From: profitroll Date: Fri, 18 Aug 2023 20:43:22 +0200 Subject: [PATCH] Added collection validation --- validation/users.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 validation/users.json diff --git a/validation/users.json b/validation/users.json new file mode 100644 index 0000000..6560dab --- /dev/null +++ b/validation/users.json @@ -0,0 +1,24 @@ +{ + "$jsonSchema": { + "required": [ + "id", + "locale" + ], + "properties": { + "user": { + "bsonType": [ + "int", + "long" + ], + "description": "Telegram ID of user" + }, + "locale": { + "bsonType": [ + "string", + "null" + ], + "description": "Preferred messages language according to " + } + } + } +} \ No newline at end of file