Initial commit
This commit is contained in:
37
validation/entries.json
Normal file
37
validation/entries.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"$jsonSchema": {
|
||||
"required": [
|
||||
"locations",
|
||||
"garbage_type",
|
||||
"date"
|
||||
],
|
||||
"properties": {
|
||||
"locations": {
|
||||
"bsonType": [
|
||||
"array"
|
||||
],
|
||||
"description": "IDs of the locations"
|
||||
},
|
||||
"garbage_type": {
|
||||
"bsonType": [
|
||||
"int"
|
||||
],
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"description": "Enum of garbage type. 0 - bio, 1 - plastic, 2 - paper, 3 - general, 4 - glass, 5 - unspecified"
|
||||
},
|
||||
"date": {
|
||||
"bsonType": [
|
||||
"date"
|
||||
],
|
||||
"description": "Date of the collection"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
45
validation/locations.json
Normal file
45
validation/locations.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"$jsonSchema": {
|
||||
"required": [
|
||||
"id",
|
||||
"name",
|
||||
"location",
|
||||
"country",
|
||||
"timezone"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"bsonType": [
|
||||
"int",
|
||||
"long"
|
||||
],
|
||||
"description": "Unique ID of the location"
|
||||
},
|
||||
"name": {
|
||||
"bsonType": [
|
||||
"string"
|
||||
],
|
||||
"description": "Location's name"
|
||||
},
|
||||
"location": {
|
||||
"bsonType": [
|
||||
"array"
|
||||
],
|
||||
"description": "Longitude and latitude of the location"
|
||||
},
|
||||
"country": {
|
||||
"bsonType": [
|
||||
"int",
|
||||
"long"
|
||||
],
|
||||
"description": "Location's country ID"
|
||||
},
|
||||
"timezone": {
|
||||
"bsonType": [
|
||||
"string"
|
||||
],
|
||||
"description": "Location's timezone according to ISO 8601"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
58
validation/users.json
Normal file
58
validation/users.json
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"$jsonSchema": {
|
||||
"required": [
|
||||
"id",
|
||||
"locale",
|
||||
"enabled",
|
||||
"location",
|
||||
"offset",
|
||||
"time_hour",
|
||||
"time_minute"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"bsonType": [
|
||||
"int",
|
||||
"long"
|
||||
],
|
||||
"description": "Telegram ID of user"
|
||||
},
|
||||
"locale": {
|
||||
"bsonType": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "Preferred language of strings"
|
||||
},
|
||||
"enabled": {
|
||||
"bsonType": "bool",
|
||||
"description": "Whether notifications are enabled"
|
||||
},
|
||||
"location": {
|
||||
"bsonType": [
|
||||
"int",
|
||||
"long"
|
||||
],
|
||||
"description": "ID of user's location"
|
||||
},
|
||||
"offset": {
|
||||
"bsonType": [
|
||||
"int"
|
||||
],
|
||||
"description": "Offset between event and notification in days"
|
||||
},
|
||||
"time_hour": {
|
||||
"bsonType": [
|
||||
"int"
|
||||
],
|
||||
"description": "Hour of notifications"
|
||||
},
|
||||
"time_minute": {
|
||||
"bsonType": [
|
||||
"int"
|
||||
],
|
||||
"description": "Minute of notifications"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user