-
Notifications
You must be signed in to change notification settings - Fork 30
/
wave.schema.json
151 lines (151 loc) · 5.61 KB
/
wave.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
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"title": "Wave configuration",
"description": "A Mojito Wave configuration for generating a test object",
"self": {
"vendor": "io.mintmetrics.mojito",
"name": "mojito_wave_configuration",
"format": "jsonschema",
"version": "1-0-0"
},
"type": "object",
"properties": {
"id": {
"title": "Wave ID",
"description": "The test ID. Also used as part of the experiment salt.",
"type": "string",
"pattern": "^[a-zA-Z0-9-]+$",
"maxLength": 128
},
"name": {
"title": "Wave name",
"description": "The name of the test to be used in reports",
"type": "string",
"maxLength": 255
},
"sampleRate": {
"title": "Sample rate",
"description": "Percentage of units exposed to the test between 0-1",
"type": "number",
"minimum": 0,
"maximum": 1
},
"divertTo": {
"title": "Divert to a recipe",
"description": "Divert all traffic in this test to a specified recipe ID",
"type": "string",
"pattern": "^[a-zA-Z0-9]+$",
"maxLength": 128
},
"recipes": {
"title": "Recipes object",
"description": "The different recipes or treatments to assign traffic amongst",
"type": "object",
"minProperties": 2,
"patternProperties": {
"^[a-zA-Z0-9]+$": {
"title": "Recipe object",
"description": "A recipe object",
"type": "object",
"properties": {
"name": {
"title": "Recipe name",
"description": "The name of the recipe used in reports",
"type": "string",
"maxLength": 128
},
"js": {
"title": "Recipe JS",
"description": "Relative path to the recipe's JS function",
"type": "string",
"pattern": "\\.js$",
"maxLength": 128
},
"css": {
"title": "Recipe CSS",
"description": "Relative path to the recipe's CSS stylesheet",
"type": "string",
"pattern": "\\.css$",
"maxLength": 128
},
"sampleRate": {
"title": "Sample rate",
"description": "The sample of traffic in the test to assign to this recipe (between 0-1)",
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"additionalProperties": true,
"required": ["name"]
}
},
"additionalProperties": false
},
"trigger": {
"title": "Trigger function",
"description": "Relative path to the experiment's trigger JS function - the function that activates an experiment",
"type": "string",
"pattern": "\\.js$",
"maxLength": 128
},
"js": {
"title": "Shared JS",
"description": "Relative path to a shared JS function run before all recipes",
"type": "string",
"pattern": "\\.js$",
"maxLength": 128
},
"css": {
"title": "Shared CSS",
"description": "Relative path to shared CSS styles applied for all recipes",
"type": "string",
"pattern": "\\.css$",
"maxLength": 128
},
"gaExperimentId": {
"title": "Google Optimize Experiment ID",
"description": "Track this experiment in Google Optimize under a given Experiment ID",
"type": "string",
"maxLength": 40
},
"state": {
"title": "State",
"description": "Specifies whether the experiment is actively accepting users into the test (i.e. live) or not (i.e. staging or inactive)",
"type": "string",
"enum": ["live", "staging", "inactive"]
},
"manualExposure": {
"title": "Manual exposure",
"description": "Controls whether exposure tracking will be handled manually (i.e. within the variant code, or automatically, upon assignment)",
"type": "boolean"
}
},
"required": ["id", "name", "recipes", "state", "sampleRate"],
"additionalProperties": true,
"oneOf": [{
"properties": {
"recipes": {
"patternProperties": {
"^[a-zA-Z0-9]+$": {
"required": ["sampleRate"]
}
}
}
}
},
{
"properties": {
"recipes": {
"patternProperties": {
"^[a-zA-Z0-9]+$": {
"not": {
"required": ["sampleRate"]
}
}
}
}
}
}
]
}