-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.dson
78 lines (76 loc) · 1.6 KB
/
spec.dson
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
{
name = "DSON Object Schema Specification Standard",
desc = "The standard defining itself",
ver = 0.0.0,
types = [{
name = type_def,
desc = "A user-defined type",
fields = [{
name = name,
type = string,
desc = "Name of the type"
required = true
}, {
name = desc,
type = string,
desc = "Description of the type",
required = false
}, {
name = fields,
type = array<field_def>,
desc = "Fields of the type",
required = true
}]
}, {
name = field_def,
desc = "An object field",
fields = [{
name = name,
type = string,
desc = "A field name",
required = true
}, {
name = type,
type = string,
desc = "A field type restriction",
required = true
}, {
name = desc,
type = string,
desc = "A field description",
required = false
}, {
name = required,
type = bool,
desc = "Whether is the field required",
default = false
}, {
name = default,
type = string,
desc = "A default value for the field of matching type",
required = false
}]
}],
fields = [{
name = name,
type = string,
desc = "The schema name"
}, {
name = desc,
type = string,
desc = "The schema description"
}, {
name = ver,
type = string,
desc = "The schema version"
}, {
name = types,
type = array<type_def>,
desc = "Types defined for the schema",
}, {
name = fields,
type = array<field_def>,
desc = "The top-level object fields",
required = true
}]
}