-
Notifications
You must be signed in to change notification settings - Fork 5
/
schema.json
140 lines (131 loc) · 3.47 KB
/
schema.json
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/ParkenDD/ParkAPI2/raw/master/web/scrapers/builtin/schema.json",
"title": "ParkAPI2 scraper snapshot layout",
"description": "The JSON that is digested by the ParkAPI database",
"type": "object",
"required": ["pool", "lots"],
"properties": {
"pool": {"$ref": "#/definitions/pool"},
"lots": {
"type": "array",
"items": {"$ref": "#/definitions/lot"}
}
},
"definitions": {
"pool": {
"title": "Parking pool",
"description": "Description of the source of scraped parking data",
"type": "object",
"required": [
"id", "name", "public_url", "timezone"
],
"properties": {
"id": {
"type": "string",
"maxLength": 64,
"pattern": "^[a-z0-9\\-]+$"
},
"name": {
"type": "string",
"maxLength": 64
},
"public_url": {
"type": "string",
"maxLength": 4096,
"pattern": "^[a-z]+://.+"
},
"source_url": {
"type": ["string", "null"],
"maxLength": 4096,
"pattern": "^[a-z]+://.+"
},
"timezone": {
"type": "string",
"maxLength": 64,
"description": "This is only used by the scraper to correctly parse datetime strings"
},
"attribution_license": {
"type": ["string", "null"]
},
"attribution_contributor": {
"type": ["string", "null"],
"maxLength": 128
},
"attribution_url": {
"type": ["string", "null"],
"maxLength": 4096,
"pattern": "[a-z]+://.+"
}
}
},
"lot": {
"title": "Parking Lot",
"description": "Description of the parking lot data",
"required": [
"id", "name", "type", "status", "source_url",
"has_live_capacity"
],
"properties": {
"id": {
"type": "string",
"maxLength": 64,
"pattern": "^[a-z0-9\\-æøé]+$"
},
"name": {
"type": "string",
"maxLength": 64
},
"type": {
"type": "string",
"maxLength": 32,
"pattern": "lot|garage|underground|level|street|bus|unknown"
},
"public_url": {
"type": ["string", "null"],
"maxLength": 4096,
"pattern": "^[a-z]+://.+"
},
"source_url": {
"type": "string",
"maxLength": 4096,
"pattern": "^[a-z]+://.+"
},
"address": {
"type": ["string", "null"],
"maxLength": 1024
},
"latitude": {
"type": ["number", "null"]
},
"longitude": {
"type": ["number", "null"]
},
"has_live_capacity": {
"type": "boolean"
},
"capacity": {
"type": ["integer", "null"]
},
"num_free": {
"type": ["integer", "null"]
},
"timestamp": {
"type": "string",
"pattern": "\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d"
},
"lot_timestamp": {
"type": ["string", "null"],
"pattern": "\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d"
},
"num_occupied": {
"type": ["integer", "null"]
},
"status": {
"type": "string",
"pattern": "open|closed|unknown|nodata|error"
}
}
}
}
}