-
Notifications
You must be signed in to change notification settings - Fork 2
/
commons-api.locations.schema.json
63 lines (63 loc) · 2.46 KB
/
commons-api.locations.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
{
"$schema": "http://json-schema.org/schema#",
"$id": "https://github.com/wielebenwir/commons-api/blob/master/commons-api.locations.schema.json",
"title": "Commons Api Locations Schema",
"description": "A schema for item locations of the Commons API",
"definitions": {
"location": {
"type": "object",
"description": "A GeoJson feature describing a location at which users can pick up items.",
"properties": {
"type": { "type": "string", "enum": ["Feature"] },
"properties": {
"type": "object",
"description": "The properties of the location",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"description": { "type": "string" },
"url": {
"type": "string",
"format": "uri"
},
"address": { "type": "string" }
},
"required": ["name", "id"]
},
"geometry": {
"type": "object",
"description": "A GeoJson point, containing the coordinates of the location",
"required": ["type", "coordinates"],
"properties": {
"type": { "type": "string", "enum": ["Point"] },
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
}
},
"required": ["type", "properties", "geometry"]
}
},
"type": "object",
"properties": {
"locations": {
"type": "object",
"description": "A GeoJson feature collection of the locations at which users can pick up items.",
"required": ["type", "features"],
"properties": {
"type": { "type": "string", "enum": ["FeatureCollection"] },
"features": {
"type": "array",
"items": { "$ref": "#/definitions/location" },
"uniqueItems": true
}
}
}
},
"required": ["locations"]
}