-
Notifications
You must be signed in to change notification settings - Fork 2
/
toml-schema.tosd
82 lines (63 loc) · 1.79 KB
/
toml-schema.tosd
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
# Metadata
[toml-schema]
version="1"
# Types
[types]
[types.schemaDef]
type = "collection"
typeref = "types.schemaDef"
[types.schemaDef.type]
type = "string"
allowedvalues = [ "array", "table", "collection", "any", "string", "integer", "float", "boolean", "offset-date-time", "local-date-time", "local-date", "local-time" ]
[types.schemaDef.typeref]
type = "string"
optional = true
[types.schemaDef.arraytype]
type = "string"
allowedvalues = ["any", "string", "integer", "float", "boolean", "offset-date-time", "local-date-time", "local-date", "local-time" ]
optional = true
[types.schemaDef.allowedvalues]
type = "array"
arraytype = "any"
optional = true
[types.schemaDef.pattern]
type = "string"
optional = true
[types.schemaDef.optional]
type = "boolean"
optional = true
[types.schemaDef.min]
type = "any"
optional = true
[types.schemaDef.max]
type = "any"
optional = true
[types.schemaDef.minlength]
type = "integer"
optional = true
min = 0
[types.schemaDef.maxlength]
type = "integer"
optional = true
min = 1
[types.schemaDef.oneof]
type = "array"
arraytype = "string"
optional = true
# Elements
[elements]
[elements.toml-schema]
type = "table"
[elements.toml-schema.version]
type = "integer"
[elements.toml-schema.meta]
type = "table"
optional = true
[elements.types]
type = "collection"
typeof = "types.schemaDef"
minlength = 0
[elements.elements]
type = "collection"
typeof = "types.schemaDef"
minlength = 1