-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdata.schema.json
68 lines (68 loc) · 2.08 KB
/
data.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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/data.schema.json",
"title": "huroutes db",
"description": "huroutes adatbázis validáció",
"type": "array",
"items": {
"description": "egy menü vagy egy útvonal definíciója",
"type": "object",
"oneOf": [
{
"properties": {
"ttl": { "$ref": "#/definitions/ttl" },
"cnt": { "$ref": "#" }
},
"additionalProperties": false,
"required": ["ttl", "cnt"]
},
{
"properties": {
"ttl": { "$ref": "#/definitions/ttl" },
"md": {
"description": "egy Markdown file helye, vagy escapelt markdown szöveg",
"type": "string",
"pattern": "^(data/[\\w-]+.md)|(.+(?<![.]md))$"
},
"kml": {
"description": "egy KML file helye",
"type": "string",
"pattern": "^data/[\\w-]+.kml$"
},
"rat": {
"description": "az út értékelése 1-10 között",
"type": "integer",
"minimum": 1,
"maximum": 10
},
"upd": {
"description": "a legutóbbi frissítés dátuma, \"év hónap\" vagy \"év hónap nap\" formában",
"type": "string",
"pattern": "^\\d{4} (január|február|március|április|május|június|július|augusztus|szeptember|október|november|december)( [1-9][0-9]?)?$"
},
"bkg": {
"description": "ha igaz, az útvonal a háttérben jelenik meg, halvány színnel",
"type": "boolean"
}
},
"additionalProperties": false,
"required": ["ttl", "kml", "md"],
"if": {
"properties": {
"bkg": { "const": false }
}
},
"then": {
"required": ["rat", "upd"]
}
}
]
},
"definitions": {
"ttl": {
"description": "a menu vagy útvonal neve",
"type": "string",
"pattern": "^[^<>]*\\w[^<>]*$"
}
}
}