-
Notifications
You must be signed in to change notification settings - Fork 16
/
preset.json
133 lines (133 loc) Β· 4.95 KB
/
preset.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
{
"title": "Preset",
"description": "Associates an icon, form fields, and other UI with a set of OSM tags",
"type": "object",
"properties": {
"name": {
"description": "The English name for the feature. A preset can reference the label of another by using that preset's identifier contained in brackets (e.g. {preset}), in which case also the preset's aliases and terms will also be referenced from that preset.",
"type": "string",
"required": true
},
"geometry": {
"description": "Valid geometry types for the feature, in order of preference",
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["point", "vertex", "line", "area", "relation"]
},
"required": true
},
"tags": {
"description": "Tags that must be present for the preset to match",
"type": "object",
"additionalProperties": {
"type": "string"
},
"required": true
},
"addTags": {
"description": "Tags that are added when changing to the preset (default is the same value as 'tags')",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"removeTags": {
"description": "Tags that are removed when changing to another preset (default is the same value as 'addTags' which in turn defaults to 'tags')",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"fields": {
"description": "Default form fields that are displayed for the preset. A preset can reference the fields of another by using that preset's identifier contained in brackets, like {preset}.",
"type": "array",
"items": {
"type": "string"
}
},
"moreFields": {
"description": "Additional form fields that can be attached with the 'Add field' dropdown. A preset can reference the \"moreFields\" of another by using that preset's identifier contained in brackets, like {preset}.",
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"description": "Name of preset icon which represents this preset",
"type": "string"
},
"imageURL": {
"description": "The URL of a remote image that is more specific than 'icon'",
"type": "string"
},
"terms": {
"description": "English search terms or related keywords",
"type": "array",
"items": {
"type": "string"
}
},
"aliases": {
"description": "Display-ready English synonyms for the `name`",
"type": "array",
"items": {
"type": "string"
}
},
"searchable": {
"description": "Whether or not the preset will be suggested via search",
"type": "boolean",
"default": true
},
"matchScore": {
"description": "The quality score this preset will receive when being compared with other matches (higher is better)",
"type": "number",
"default": 1.0
},
"reference": {
"description": "Taginfo documentation parameters (to be used when a preset manages multiple tags)",
"type": "object",
"properties": {
"key": {
"description": "For documentation of a key",
"type": "string",
"required": true
},
"value": {
"description": "For documentation of a tag (key and value)",
"type": "string"
}
},
"additionalProperties": false
},
"replacement": {
"description": "The ID of a preset that is preferable to this one",
"type": "string"
},
"locationSet": {
"description": "An object specifying the IDs of regions where this preset is or isn't valid. See: https://github.com/ideditor/location-conflation",
"type": "object",
"properties": {
"include": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"exclude": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}