Repository navigation
Expand file tree
/
Copy pathdata.schema.json
More file actions
66 lines (66 loc) · 1.89 KB
/
Copy pathdata.schema.json
File metadata and controls
66 lines (66 loc) · 1.89 KB
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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Iris 0.1 canonical data",
"type": "object",
"required": ["iris", "entries"],
"additionalProperties": false,
"properties": {
"iris": {"const": "0.1"},
"entries": {"type": "array", "items": {"$ref": "#/$defs/entry"}}
},
"$defs": {
"int": {
"type": "integer",
"minimum": -9223372036854775808,
"maximum": 9223372036854775807
},
"intTree": {
"anyOf": [
{"$ref": "#/$defs/int"},
{"type": "array", "items": {"$ref": "#/$defs/intTree"}}
]
},
"floatTree": {
"anyOf": [
{"type": "number"},
{"type": "array", "items": {"$ref": "#/$defs/floatTree"}}
]
},
"stringTree": {
"anyOf": [
{"type": "string"},
{"type": "array", "items": {"$ref": "#/$defs/stringTree"}}
]
},
"entry": {
"type": "object",
"required": ["name", "type", "depth", "value"],
"additionalProperties": false,
"properties": {
"name": {"type": "string"},
"type": {"enum": ["int", "float", "string"]},
"depth": {"type": "integer", "minimum": 0},
"value": {}
},
"allOf": [
{
"if": {"properties": {"depth": {"const": 0}}},
"then": {"properties": {"value": {"type": ["number", "string"]}}},
"else": {"properties": {"value": {"type": "array"}}}
},
{
"if": {"properties": {"type": {"const": "int"}}},
"then": {"properties": {"value": {"$ref": "#/$defs/intTree"}}}
},
{
"if": {"properties": {"type": {"const": "float"}}},
"then": {"properties": {"value": {"$ref": "#/$defs/floatTree"}}}
},
{
"if": {"properties": {"type": {"const": "string"}}},
"then": {"properties": {"value": {"$ref": "#/$defs/stringTree"}}}
}
]
}
}
}