-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathapplicationConfigurationSchema.json
178 lines (178 loc) · 6.97 KB
/
applicationConfigurationSchema.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "DBB Application Configuration Variables",
"description": "DBB Application configuration variables used in the orchestration of DBB builds to override build configuration variables.",
"type": "object",
"additionalProperties": false,
"required": ["version"],
"properties": {
"version": {
"type": "string",
"description": "The version of DBB application configuration schema being used for this configuration. This field does not validate anything when used inside of an IDE. It will only be validated at runtime."
},
"application": {
"type": "object",
"description": "Application Configuration Variables",
"required": ["name"],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Name of the application to override."
},
"include": {
"type": "array",
"description": "Included files to merge into configuration.",
"items": {
"type": "object",
"description": "File Include",
"additionalProperties": false,
"properties": {
"file": {
"type": "string",
"description": "The path of a file."
}
}
}
},
"tasks": {
"type": ["array", "null"],
"description": "task variable overrides",
"items": {
"type": "object",
"description": "task variable override",
"additionalProperties": false,
"properties": {
"task": {
"type": "string",
"description": "Name of an existing task to override"
},
"sources": {
"if": { "type": "array" },
"then": {
"type": "array",
"description": "Rule that applies to a list of patterns",
"items": {
"type": "string",
"description": "A glob file pattern for conditional matching"
}
},
"else": {
"if": { "type": "string" },
"then": {
"type": "string",
"description": "A glob file pattern for conditional matching"
},
"else": { "type": ["array", "string"] }
}
},
"variables": {
"type": "array",
"description": "",
"items": {
"type": "object",
"description": "Properties provided to the current context",
"required": ["name"],
"properties": {
"name": { "$ref": "#/$defs/variableName" },
"value": { "$ref": "#/$defs/variableValue" },
"forFiles": {
"if": { "type": "array" },
"then": {
"type": "array",
"description": "Rule that applies to a list of patterns",
"items": { "$ref": "#/$defs/filePattern" }
},
"else": {
"if": { "type": "string" },
"then": { "$ref": "#/$defs/filePattern" },
"else": { "type": ["array", "string"] }
}
},
"delimiter": {
"description": "The delimiter used when constructing append conditionals or appending lists to this value.",
"type": "string"
},
"restricted": {
"type": "boolean",
"description": "If true, this variable cannot be overridden by included files like the application configuration. Default: false"
},
"select": {
"type": "array",
"description": "",
"items": {
"type": "object",
"description": "A condition and a value to associate with it.",
"required": ["condition"],
"properties": {
"condition": { "$ref": "#/$defs/condition" },
"value": { "$ref": "#/$defs/variableValue" }
}
}
},
"append": {
"type": "array",
"description": "",
"items": {
"type": "object",
"description": "A condition and a value to associate with it.",
"required": ["condition"],
"properties": {
"condition": { "$ref": "#/$defs/condition" },
"value": {
"type": ["string", "boolean", "number", "array"],
"description": "An appended variable value."
}
}
}
}
}
}
}
}
}
}
}
}
},
"$defs": {
"variableName": { "type": "string", "description": "Variable name" },
"variableValue": {
"description": "Variable value",
"type": ["string", "boolean", "number", "array", "object"]
},
"filePattern": {
"type": "string",
"description": "A glob file pattern for conditional matching"
},
"condition": {
"type": ["object", "string"],
"properties": {
"eval": {
"type": ["string", "array"],
"description": "Conditional statement that will be evaluated by the JEXL Engine.",
"items": {
"type": "string",
"description": "Conditional statement that will be evaluated by the JEXL Engine. All statements must evaluate to true."
}
},
"exists": {
"type": ["string", "array"],
"description": "Condition is only true if the provided property exists. Evaluations are run after this step if it resolves to true.",
"items": {
"type": "string",
"description": "Condition is only true if the all provided properties exist. Evaluations are run after this step if it resolves to true."
}
},
"notExists": {
"type": ["string", "array"],
"description": "Condition is only true if the provided property does not exist. Evaluations are run after this step if it resolves to true.",
"items": {
"type": "string",
"description": "Condition is only true if the all provided properties do not exist. Evaluations are run after this step if it resolves to true."
}
}
}
}
}
}