-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
113 lines (113 loc) · 2.55 KB
/
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
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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Test schema.",
"type": "object",
"definitions": {
"port": {
"description": "schema for a server port",
"type": "integer",
"minimum": 1024,
"maximum": 65536,
"messages": {
"type": "invalid type. Must be an integer.",
"minimum": "invalid value. Must be an integer greater than or equal to 1024.",
"maximum": "invalid value. Must be an integer less than or equal to 65536."
}
},
"address": {
"description": "schema for a server host address",
"type": "string",
"format": "hostname",
"messages": {
"type": "invalid type. Must be a string.",
"format": "invalid format. Must be a valid hostname."
}
},
"loglevel": {
"description": "schema for a log level",
"type": "string",
"enum": [
"fatal",
"error",
"warn",
"info",
"debug",
"trace"
],
"messages": {
"type": "invalid type. Must be a string.",
"enum": "invalid value. Must be one of the following: ['fatal','error','warn','info','debug','trace']."
}
},
"env": {
"description": "schema for an environment name",
"type": "string",
"enum": [
"local",
"test",
"dev",
"production"
],
"messages": {
"type": "invalid type. Must be a string.",
"enum": "invalid value. Must be one of the following: ['local','test','dev','production']."
}
}
},
"properties": {
"server": {
"description": "schema for server configuration",
"type": "object",
"properties": {
"port": {
"$ref": "#/definitions/port"
},
"address": {
"$ref": "#/definitions/address"
},
"ssl": {
"description": "schema for SSL flag",
"type": "boolean",
"messages": {
"type": "invalid type. Must be a boolean."
}
},
"key": {
"description": "schema for private key",
"type": "string",
"messages": {
"type": "invalid type. Must be a string."
}
},
"cert": {
"description": "schema for public certificate",
"type": "string",
"messages": {
"type": "invalid type. Must be a string."
}
}
},
"messages": {
"type": "invalid type. Must be an object."
}
},
"logger": {
"description": "schema for logger configuration",
"type": "object",
"properties": {
"level": {
"$ref": "#/definitions/loglevel"
}
},
"messages": {
"type": "invalid type. Must be an object."
}
},
"env": {
"$ref": "#/definitions/env"
}
},
"messages": {
"type": "invalid data type where an object is expected"
}
}