Skip to content

Commit 039bfa8

Browse files
authored
Bug 1687027 - Add a schema for InfoBar of Messaging System (#648)
1 parent 1d07ce7 commit 039bfa8

File tree

3 files changed

+128
-0
lines changed

3 files changed

+128
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"mozPipelineMetadata": {
4+
"bq_dataset_family": "messaging_system",
5+
"bq_metadata_format": "structured",
6+
"bq_table": "infobar_v1",
7+
"expiration_policy": {
8+
"delete_after_days": 180
9+
}
10+
},
11+
"properties": {
12+
"addon_version": {
13+
"type": "string"
14+
},
15+
"browser_session_id": {
16+
"description": "A mirror of the browser sessionId, as defined in https://github.com/mozilla-services/mozilla-pipeline-schemas/blob/master/schemas/telemetry/main/main.4.schema.json",
17+
"type": "string"
18+
},
19+
"client_id": {
20+
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
21+
"type": "string"
22+
},
23+
"event": {
24+
"description": "An event identifier",
25+
"type": "string"
26+
},
27+
"event_context": {
28+
"description": "A string that describes the context about this event",
29+
"type": "string"
30+
},
31+
"experiments": {
32+
"additionalProperties": {
33+
"properties": {
34+
"branch": {
35+
"type": "string"
36+
}
37+
},
38+
"type": "object"
39+
},
40+
"description": "An object to record all active experiments, experiments IDs are stored as keys, and the value object stores the branch information. Example: {\"experiment_1\": {\"branch\": \"control\"}, \"experiment_2\": {\"branch\": \"treatment\"}}. This deprecates the \"shield_id\" used in activity-stream and messaging-system.",
41+
"type": "object"
42+
},
43+
"locale": {
44+
"type": "string"
45+
},
46+
"message_id": {
47+
"type": "string"
48+
},
49+
"release_channel": {
50+
"type": "string"
51+
},
52+
"version": {
53+
"type": "string"
54+
}
55+
},
56+
"required": [
57+
"client_id",
58+
"event",
59+
"message_id",
60+
"addon_version",
61+
"version",
62+
"locale"
63+
],
64+
"title": "infobar",
65+
"type": "object"
66+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"title": "infobar",
5+
"properties": {
6+
@ACTIVITY-STREAM_EXPERIMENTS_1_JSON@,
7+
"client_id": {
8+
"type": "string",
9+
@COMMON_PATTERN_UUID_1_JSON@
10+
},
11+
"event": {
12+
"description": "An event identifier",
13+
"type": "string"
14+
},
15+
"event_context": {
16+
"description": "A string that describes the context about this event",
17+
"type": "string"
18+
},
19+
"message_id": {
20+
"type": "string"
21+
},
22+
"addon_version": {
23+
"type": "string"
24+
},
25+
"version": {
26+
"type": "string"
27+
},
28+
"release_channel": {
29+
"type": "string"
30+
},
31+
"locale": {
32+
"type": "string"
33+
},
34+
"browser_session_id": {
35+
"description": "A mirror of the browser sessionId, as defined in https://github.com/mozilla-services/mozilla-pipeline-schemas/blob/master/schemas/telemetry/main/main.4.schema.json",
36+
"type": "string"
37+
}
38+
},
39+
"required": [
40+
"client_id",
41+
"event",
42+
"message_id",
43+
"addon_version",
44+
"version",
45+
"locale"
46+
]
47+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"experiments": {
3+
"exp1": {
4+
"branch": "treatment-a"
5+
}
6+
},
7+
"addon_version": "20210115035053",
8+
"release_channel": "release",
9+
"locale": "en-US",
10+
"event": "IMPRESSION",
11+
"client_id": "c4beb4bf-4feb-9c4e-9587-9323b28c2e50",
12+
"version": "86",
13+
"message_id": "INFOBAR_ACTION_86",
14+
"browser_session_id": "93714e76-9919-ca49-b697-5e7c09a1394f"
15+
}

0 commit comments

Comments
 (0)