-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsource.schema.json
57 lines (57 loc) · 2.49 KB
/
source.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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/bcgov/harvest-restrictions/main/sources.schema.json",
"title": "Resource extraction restriction data sources",
"description": "List of data sources used to generate harvest restrictions, in order of hierarchy",
"type": "array",
"items": {
"type": "object",
"properties": {
"alias": {
"description": "Key to uniquely identify the data source when processing (lower case, _ separated)",
"type": "string"
},
"description": {
"description": "Description of the data source as defined",
"type": "string"
},
"source_type": {
"description": "Describes whether source is to be downloaded from BCGW (ie WFS using bcdata) or from FILE",
"type": "string",
"enum": ["BCGW", "FILE"]
},
"source": {
"description": "Full name of the BCGW table to use as source (eg, WHSE_ADMIN_BOUNDARIES.CLAB_NATIONAL_PARKS) or url/path of a file based source readable by GDAL/OGR",
"type": "string"
},
"layer": {
"description": "Layer to use within a file based source",
"type": "string"
},
"query": {
"description": "Query to subset data in source/layer - ECQL for BCGW sources, OGR SQL for files",
"type": ["string", "null"]
},
"primary_key": {
"description": "The source column holding the primary key",
"type": ["string", "null"]
},
"field mapper": {
"description": "Mapping of source column names to new column names",
"type": "object"
},
"data": {
"description": "Additional data to add to all records of the source, as key(column):value pair",
"type": "object",
"properties": {
"harvest_restriction": {
"description": "Forest harvesting restriction level associated with the designation",
"type": "integer",
"enum": [1, 2, 3, 4, 5, 6]
}
}
}
},
"required": ["alias", "description", "source_type", "source", "query", "field_mapper", "data"]
}
}