-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathFeatureManagement.Dotnet.v1.0.0.schema.json
112 lines (112 loc) · 4.11 KB
/
FeatureManagement.Dotnet.v1.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
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "A .NET Feature Management Configuration",
"required": [
"FeatureManagement"
],
"properties":{
"FeatureManagement": {
"type": "object",
"title": "Feature Management",
"description": "Declares feature management configuration.",
"required": [],
"patternProperties": {
"^[^:]*$": {
"description": "Declares a feature flag.",
"anyOf": [
{
"type": "boolean",
"title": "On/Off Feature Flag",
"description": "A feature flag that always returns the same value."
},
{
"type": "object",
"title": "Conditional Feature Flag",
"description": "A feature flag which value is dynamic based on a set of feature filters",
"required": [
"EnabledFor"
],
"properties": {
"RequirementType": {
"type": "string",
"title": "Requirement Type",
"description": "Determines whether any or all registered feature filters must be enabled for the feature to be considered enabled.",
"enum": [
"Any",
"All"
],
"default": "Any"
},
"EnabledFor": {
"oneOf": [
{
"type": "array",
"title": "Feature Filter Collection",
"description": "Feature filters that are evaluated to conditionally enable the flag.",
"items": {
"type": "object",
"title": "Feature Filter Declaration",
"required": [
"Name"
],
"properties": {
"Name": {
"type": "string",
"title": "Feature Filter Name",
"description": "The name used to refer to and require a feature filter.",
"default": "",
"examples": [
"Percentage",
"TimeWindow"
],
"pattern": "^[^:]*$"
},
"Parameters": {
"type": "object",
"title": "Feature Filter Parameters",
"description": "Custom parameters for a given feature filter. A feature 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"
}
]
}
}
}
}
}
},
{
"type": "boolean"
}
]
},
"additionalProperties": false
}
}
]
}
}
}
}
}