-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevent-schema.json
More file actions
95 lines (95 loc) · 2.81 KB
/
event-schema.json
File metadata and controls
95 lines (95 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
"$id": "http://example.com/example.json",
"$schema": "http://json-schema.org/draft-07/schema",
"default": {},
"description": "The event schema that all sensors, cameras and other IOT devices will use to store their data on the database.",
"examples": [
{
"timestamp": "2012-04-23T18:25:43.511Z",
"deviceId": 1,
"targetId": 1,
"queueing": 7,
"freeSeats": 2,
"event": "personIn"
}
],
"required": [
"timestamp",
"deviceId",
"targetId"
],
"title": "The event schema of the database",
"type": "object",
"properties": {
"timestamp": {
"$id": "#/properties/timestamp",
"type": "string",
"title": "The timestamp of the event",
"description": "The timestamp of the event.",
"default": "",
"examples": [
"2012-04-23T18:25:43.511Z"
]
},
"deviceId": {
"$id": "#/properties/deviceId",
"type": "integer",
"title": "The device's ID",
"description": "The unique ID that a device has.",
"default": "",
"examples": [
1,2,3
]
},
"targetId": {
"$id": "#/properties/targetId",
"default": 3,
"description": "1 for queueing, 2 for freeSeats, 3 for event",
"enum": [
1,
2,
3
],
"examples": [
1
],
"title": "The ID of the target event that needs to be stored.",
"type": "integer"
},
"queueing": {
"$id": "#/properties/queueing",
"default": 0,
"description": "The number of people that are waiting in a queue.",
"examples": [
7
],
"title": "The number of people in a queue",
"type": "integer"
},
"freeSeats": {
"$id": "#/properties/freeSeats",
"type": "integer",
"title": "The number of free seats available",
"description": "The number of free seats available for someone to sit on.",
"default": 0,
"examples": [
2
]
},
"event": {
"$id": "#/properties/event",
"default": "",
"description": "Any additional event that has to be stored on the database.",
"examples": [
"personIn"
],
"title": "An event that we want to store.",
"enum": [
"personIn",
"personOut"
],
"type": "string"
}
},
"additionalProperties": true
}