-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
86 lines (85 loc) · 2.93 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
{
"$schema": "https://json-schema.org/schema",
"$id": "https://github.com/RuarriS/beachcleanupdata/schema.json",
"title": "BeachTrash 1.0",
"description": "JSON Schema for BeachTrash 1.0 data standard",
"properties": {
"$schema": "",
"documentTime": "",
"records": {
"type": "array",
"minItems": 1,
"items": {
"description": "An amount of a particular type of litter found in a location",
"properties": {
"guid": { "type": "string"},
"publicationTime": {
"type": "string",
"format": "date-time"
},
"updateTime": {
"type": "string",
"format": "date-time"
},
"collectedTime": {
"type": "string",
"format": "date-time"
},
"collection": {
"description": "Describes whether this result is part of a larger collection event",
"type": "object",
"properties": {
"partOfCollection": { "type": "boolean" },
"id": { "type": "string"}
},
"required": [ "partofCollection"]
},
"location": {
"$ref": "#/defintions/location"
},
"litter": {
"$ref": "#/definitions/litter"
}
},
"required": [
"guid",
"publicationTime",
"updateTime",
"collectedTime",
"collection",
"location",
"litter"
]
},
"default": []
}
},
"definitions": {
"litter": {
"type": "object",
"oneOf": [
{ "$ref": "objects.json/#bottle" },
{ "$ref": "objects.json/#bottleCap" },
{ "$ref": "objects.json/#bag" },
{ "$ref": "objects.json/#straw" },
{ "$ref": "objects.json/#stirrer"},
{ "$ref": "objects.json/#fishingLine"}
]
},
"location" : {
"type": "object",
"properties" : {
"id": {"type": "string"},
"name": {"type": "string"},
"coordinates": {
"type": "object",
"properties":{
"latitude": {"type": "number"},
"longitude": {"type": "number"}
}
}
},
"required": ["coordinates"]
},
}
}