-
Notifications
You must be signed in to change notification settings - Fork 0
/
FeatureFlag.v2.0.0.schema.json
341 lines (341 loc) · 14 KB
/
FeatureFlag.v2.0.0.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
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://azconfig.io/schemas/FeatureManagement/v2.0.0/FeatureFlag.json",
"type": "object",
"title": "An Azure App Configuration Feature Declaration",
"required": [
"id"
],
"properties": {
"id": {
"$id": "#/properties/id",
"type": "string",
"title": "Feature ID",
"description": "An ID used to uniquely identify and reference the feature.",
"examples": [
"fancy-background"
],
"pattern": "^[^:\n\r%]*$"
},
"description": {
"$id": "#/properties/description",
"type": "string",
"title": "Feature Description",
"description": "A description of the feature.",
"default": "",
"examples": [
"This will display a fancy background on the home page."
],
"pattern": "^(.*)$"
},
"display_name": {
"$id": "#/properties/display_name",
"type": "string",
"title": "Feature Display Name",
"description": "A display name for the feature to use for display rather than the ID.",
"default": "",
"examples": [
"Fancy Background"
],
"pattern": "^(.*)$"
},
"enabled": {
"$id": "#/properties/enabled",
"type": "boolean",
"title": "Enabled State",
"description": "A feature is OFF if enabled is false. If enabled is true, then the feature is ON if there are no conditions (null or empty) or if the conditions are satisfied.",
"default": false
},
"conditions": {
"$id": "#/properties/conditions",
"type": "object",
"title": "Feature Enablement Conditions",
"description": "The declaration of conditions used to dynamically enable the feature",
"required": [],
"properties": {
"requirement_type": {
"$id": "#/properties/conditions/properties/requirement_type",
"type": "string",
"title": "Requirement Type",
"description": "Determines whether any or all registered client filters must be evaluated as true for the feature to be considered enabled.",
"enum": [
"Any",
"All"
],
"default": "Any"
},
"client_filters": {
"$id": "#/properties/conditions/properties/client_filters",
"type": "array",
"title": "Client Filter Collection",
"description": "Filters that must run on the client and be evaluated as true for the feature to be considered enabled.",
"items": {
"$id": "#/properties/conditions/properties/client_filters/items",
"type": "object",
"title": "Client Filter",
"required": [
"name"
],
"properties": {
"name": {
"$id": "#/properties/conditions/properties/client_filters/items/properties/name",
"type": "string",
"title": "Client Filter Name",
"description": "The name used to refer to a client filter.",
"examples": [
"Percentage",
"TimeWindow"
],
"pattern": "^(.*)$"
},
"parameters": {
"$id": "#/properties/conditions/properties/client_filters/items/properties/parameters",
"type": "object",
"title": "Client Filter Parameters",
"description": "Parameters for a given client filter. A client filter can require any set of parameters of any type.",
"required": [],
"patternProperties": {
"^.*$": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
},
{
"type": "object"
},
{
"type": "number"
},
{
"type": "array"
},
{
"type": "boolean"
}
]
}
},
"additionalProperties": false
}
}
}
}
}
},
"variants": {
"$id": "#/properties/variants",
"type": "array",
"title": "Variant Collection",
"description": "The list of variants defined for this feature. A variant represents a configuration value of a feature flag that can be a string, a number, a boolean, or a JSON object.",
"items": {
"$id": "#/properties/variants/items",
"type": "object",
"title": "Variant",
"required": [
"name"
],
"properties":{
"name": {
"$id": "#/properties/variants/items/properties/name",
"type": "string",
"title": "Variant Name",
"description": "The name used to refer to a feature variant.",
"pattern": "^(.*)$"
},
"configuration_value": {
"$id": "#/properties/variants/items/properties/configuration_value",
"type": ["string", "null", "number", "object", "array", "boolean"],
"title": "Variant Configuration Value",
"description": "The configuration value for this feature variant.",
"default": null
},
"status_override": {
"$id": "#/properties/variants/items/properties/status_override",
"type": "string",
"title": "Variant Status Override",
"description": "Overrides the enabled state of the feature if the given variant is assigned. Does not override the state if value is None.",
"enum": [
"None",
"Enabled",
"Disabled"
],
"default": "None"
}
}
}
},
"allocation": {
"$id": "#/properties/allocation",
"type": "object",
"title": "Variant Allocation",
"description": "Determines how variants should be allocated for the feature to various users.",
"required": [],
"properties": {
"default_when_disabled": {
"$id": "#/properties/allocation/properties/default_when_disabled",
"type": "string",
"title": "Default Variant Allocation When Disabled",
"description": "Specifies which variant should be used when the feature is considered disabled.",
"default": "",
"pattern": "^(.*)$"
},
"default_when_enabled": {
"$id": "#/properties/allocation/properties/default_when_enabled",
"type": "string",
"title": "Default Variant Allocation When Enabled",
"description": "Specifies which variant should be used when the feature is considered enabled and no other allocation rules are applicable.",
"default": "",
"pattern": "^(.*)$"
},
"user": {
"$id": "#/properties/allocation/properties/user",
"type": "array",
"title": "User Allocation Collection",
"description": "A list of objects, each containing a variant name and list of users for whom that variant should be used.",
"items": {
"$id": "#/properties/allocation/properties/user/items",
"type": "object",
"title": "User Allocation",
"required": [
"variant",
"users"
],
"properties": {
"variant": {
"$id": "#/properties/allocation/properties/user/items/properties/variant",
"type": "string",
"title": "User Allocation Variant",
"description": "The name of the variant to use if the user allocation matches the current user.",
"pattern": "^(.*)$"
},
"users": {
"$id": "#/properties/allocation/properties/user/items/properties/users",
"type": "array",
"title": "User Allocation Users Collection",
"description": "Collection of users where if any match the current user, the variant specified in the user allocation is used.",
"items": {
"type": "string"
}
}
}
}
},
"group": {
"$id": "#/properties/allocation/properties/group",
"type": "array",
"title": "Group Allocation Collection",
"description": "A list of objects, each containing a variant name and list of groups for which that variant should be used.",
"items": {
"$id": "#/properties/allocation/properties/group/items",
"type": "object",
"title": "Group Allocation",
"required": [
"variant",
"groups"
],
"properties": {
"variant": {
"$id": "#/properties/allocation/properties/group/items/properties/variant",
"type": "string",
"title": "Group Allocation Variant",
"description": "The name of the variant to use if the group allocation matches a group the current user is in.",
"pattern": "^(.*)$"
},
"groups": {
"$id": "#/properties/allocation/properties/group/items/properties/groups",
"type": "array",
"title": "Group Allocation Groups Collection",
"description": "Collection of groups where if the current user is in any of these groups, the variant specified in the group allocation is used.",
"items": {
"type": "string"
}
}
}
}
},
"percentile": {
"$id": "#/properties/allocation/properties/percentile",
"type": "array",
"title": "Percentile Allocation Collection",
"description": "A list of objects, each containing a variant name and percentage range for which that variant should be used.",
"items": {
"$id": "#/properties/allocation/properties/percentile/items",
"type": "object",
"title": "Percentile Allocation",
"required": [
"variant",
"from",
"to"
],
"properties": {
"variant": {
"$id": "#/properties/allocation/properties/percentile/items/properties/variant",
"type": "string",
"title": "Percentile Allocation Variant",
"description": "The name of the variant to use if the calculated percentile for the current user falls in the provided range.",
"pattern": "^(.*)$"
},
"from": {
"$id": "#/properties/allocation/properties/percentile/items/properties/from",
"type": "number",
"title": "Percentile Allocation From",
"description": "The lower end of the percentage range for which this variant will be used.",
"minimum": 0,
"maximum": 100
},
"to": {
"$id": "#/properties/allocation/properties/percentile/items/properties/to",
"type": "number",
"title": "Percentile Allocation To",
"description": "The upper end of the percentage range for which this variant will be used.",
"minimum": 0,
"maximum": 100
}
}
}
},
"seed": {
"$id": "#/properties/allocation/properties/seed",
"type": "string",
"title": "Percentile Allocation Seed",
"description": "The value percentile calculations are based on. The calculated percentile is consistent across features for a given user if the same nonempty seed is used.",
"default": "",
"pattern": "^(.*)$"
}
}
},
"telemetry": {
"$id": "#/properties/telemetry",
"type": "object",
"title": "Telemetry Options",
"description": "The declaration of options used to configure telemetry for this feature.",
"required": [],
"properties": {
"enabled": {
"$id": "#/properties/telemetry/properties/enabled",
"type": "boolean",
"title": "Telemetry Enabled State",
"description": "Indicates if telemetry is enabled.",
"default": false
},
"metadata": {
"$id": "#/properties/telemetry/properties/metadata",
"type": "object",
"title": "Telemetry Metadata",
"description": "A container for metadata that should be bundled with flag telemetry.",
"required": [],
"patternProperties": {
"^.*$": {
"type": "string"
}
},
"additionalProperties": false
}
}
}
}
}