Skip to content

Commit b6b1af3

Browse files
committed
Rebuild schemas to add "null" as an allowed type for non-required properties.
1 parent 6a515d6 commit b6b1af3

File tree

102 files changed

+20960
-5304
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+20960
-5304
lines changed

schemas/activity-stream/events/events.1.schema.json

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,20 @@
1515
"properties": {
1616
"action_position": {
1717
"description": "A zero based integer indicating the position of this event",
18-
"type": "integer"
18+
"type": [
19+
"integer",
20+
"null"
21+
]
1922
},
2023
"addon_version": {
2124
"type": "string"
2225
},
2326
"browser_session_id": {
2427
"description": "A mirror of the browser sessionId, as defined in https://github.com/mozilla-services/mozilla-pipeline-schemas/blob/main/schemas/telemetry/main/main.4.schema.json",
25-
"type": "string"
28+
"type": [
29+
"string",
30+
"null"
31+
]
2632
},
2733
"client_id": {
2834
"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}$",
@@ -42,7 +48,10 @@
4248
"type": "object"
4349
},
4450
"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.",
45-
"type": "object"
51+
"type": [
52+
"object",
53+
"null"
54+
]
4655
},
4756
"locale": {
4857
"type": "string"
@@ -55,38 +64,66 @@
5564
"unknown",
5665
"n/a",
5766
"both",
58-
"https://newtab.firefoxchina.cn/newtab/as/activity-stream.html"
67+
"https://newtab.firefoxchina.cn/newtab/as/activity-stream.html",
68+
null
5969
],
60-
"type": "string"
70+
"type": [
71+
"string",
72+
"null"
73+
]
6174
},
6275
"profile_creation_date": {
63-
"type": "integer"
76+
"type": [
77+
"integer",
78+
"null"
79+
]
6480
},
6581
"region": {
66-
"type": "string"
82+
"type": [
83+
"string",
84+
"null"
85+
]
6786
},
6887
"release_channel": {
69-
"type": "string"
88+
"type": [
89+
"string",
90+
"null"
91+
]
7092
},
7193
"session_id": {
7294
"description": "A UUID representing an Activity Stream session. This can be used to do table joins between `sessions` and `events` in Activity Stream. Note that `n/a` denotes that the session is not applicable in the context.",
7395
"pattern": "^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$|^n/a$",
74-
"type": "string"
96+
"type": [
97+
"string",
98+
"null"
99+
]
75100
},
76101
"shield_id": {
77102
"description": "[DEPRECATED]: use `experiments` instead. A semicolon separated string to store a list of Shield study IDs",
78-
"type": "string"
103+
"type": [
104+
"string",
105+
"null"
106+
]
79107
},
80108
"source": {
81-
"type": "string"
109+
"type": [
110+
"string",
111+
"null"
112+
]
82113
},
83114
"user_prefs": {
84115
"description": "An encoded integer representing user's preferences of Activity Stream",
85-
"type": "integer"
116+
"type": [
117+
"integer",
118+
"null"
119+
]
86120
},
87121
"value": {
88122
"description": "A string that describes the context about this event",
89-
"type": "string"
123+
"type": [
124+
"string",
125+
"null"
126+
]
90127
},
91128
"version": {
92129
"type": "string"

schemas/activity-stream/impression-stats/impression-stats.1.schema.json

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@
1818
},
1919
"block": {
2020
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
21-
"type": "integer"
21+
"type": [
22+
"integer",
23+
"null"
24+
]
2225
},
2326
"click": {
2427
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
25-
"type": "integer"
28+
"type": [
29+
"integer",
30+
"null"
31+
]
2632
},
2733
"experiments": {
2834
"additionalProperties": {
@@ -34,7 +40,10 @@
3440
"type": "object"
3541
},
3642
"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.",
37-
"type": "object"
43+
"type": [
44+
"object",
45+
"null"
46+
]
3847
},
3948
"impression_id": {
4049
"description": "A UUID representing this user. Note that it's not client_id, nor can it be used to link to a client_id",
@@ -43,7 +52,10 @@
4352
},
4453
"loaded": {
4554
"description": "An integer to record the size of the loaded 'tiles' list",
46-
"type": "integer"
55+
"type": [
56+
"integer",
57+
"null"
58+
]
4759
},
4860
"locale": {
4961
"type": "string"
@@ -62,23 +74,41 @@
6274
},
6375
"pocket": {
6476
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
65-
"type": "integer"
77+
"type": [
78+
"integer",
79+
"null"
80+
]
6681
},
6782
"profile_creation_date": {
68-
"type": "integer"
83+
"type": [
84+
"integer",
85+
"null"
86+
]
6987
},
7088
"region": {
71-
"type": "string"
89+
"type": [
90+
"string",
91+
"null"
92+
]
7293
},
7394
"release_channel": {
74-
"type": "string"
95+
"type": [
96+
"string",
97+
"null"
98+
]
7599
},
76100
"shield_id": {
77101
"description": "[DEPRECATED]: use `experiments` instead. A semicolon separated string to store a list of Shield study IDs",
78-
"type": "string"
102+
"type": [
103+
"string",
104+
"null"
105+
]
79106
},
80107
"source": {
81-
"type": "string"
108+
"type": [
109+
"string",
110+
"null"
111+
]
82112
},
83113
"tiles": {
84114
"items": {
@@ -87,7 +117,10 @@
87117
"type": "integer"
88118
},
89119
"pos": {
90-
"type": "integer"
120+
"type": [
121+
"integer",
122+
"null"
123+
]
91124
}
92125
},
93126
"required": [
@@ -101,15 +134,24 @@
101134
"type": "integer"
102135
},
103136
"version": {
104-
"type": "string"
137+
"type": [
138+
"string",
139+
"null"
140+
]
105141
},
106142
"window_inner_height": {
107143
"description": "The interior height of the window in pixels, including the height of the horizontal scroll bar, if present",
108-
"type": "integer"
144+
"type": [
145+
"integer",
146+
"null"
147+
]
109148
},
110149
"window_inner_width": {
111150
"description": "The interior width of the window in pixels. This includes the width of the vertical scroll bar, if one is present.",
112-
"type": "integer"
151+
"type": [
152+
"integer",
153+
"null"
154+
]
113155
}
114156
},
115157
"required": [

schemas/activity-stream/impression-stats/impression-stats.2.schema.json

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@
1818
},
1919
"block": {
2020
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
21-
"type": "integer"
21+
"type": [
22+
"integer",
23+
"null"
24+
]
2225
},
2326
"click": {
2427
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
25-
"type": "integer"
28+
"type": [
29+
"integer",
30+
"null"
31+
]
2632
},
2733
"experiments": {
2834
"additionalProperties": {
@@ -34,7 +40,10 @@
3440
"type": "object"
3541
},
3642
"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.",
37-
"type": "object"
43+
"type": [
44+
"object",
45+
"null"
46+
]
3847
},
3948
"impression_id": {
4049
"description": "A UUID representing this user. Note that it's not client_id, nor can it be used to link to a client_id",
@@ -43,7 +52,10 @@
4352
},
4453
"loaded": {
4554
"description": "An integer to record the size of the loaded 'tiles' list",
46-
"type": "integer"
55+
"type": [
56+
"integer",
57+
"null"
58+
]
4759
},
4860
"locale": {
4961
"type": "string"
@@ -62,19 +74,34 @@
6274
},
6375
"pocket": {
6476
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
65-
"type": "integer"
77+
"type": [
78+
"integer",
79+
"null"
80+
]
6681
},
6782
"profile_creation_date": {
68-
"type": "integer"
83+
"type": [
84+
"integer",
85+
"null"
86+
]
6987
},
7088
"region": {
71-
"type": "string"
89+
"type": [
90+
"string",
91+
"null"
92+
]
7293
},
7394
"release_channel": {
74-
"type": "string"
95+
"type": [
96+
"string",
97+
"null"
98+
]
7599
},
76100
"source": {
77-
"type": "string"
101+
"type": [
102+
"string",
103+
"null"
104+
]
78105
},
79106
"tiles": {
80107
"items": {
@@ -84,7 +111,10 @@
84111
"type": "string"
85112
},
86113
"pos": {
87-
"type": "integer"
114+
"type": [
115+
"integer",
116+
"null"
117+
]
88118
}
89119
},
90120
"required": [
@@ -98,15 +128,24 @@
98128
"type": "integer"
99129
},
100130
"version": {
101-
"type": "string"
131+
"type": [
132+
"string",
133+
"null"
134+
]
102135
},
103136
"window_inner_height": {
104137
"description": "The interior height of the window in pixels, including the height of the horizontal scroll bar, if present",
105-
"type": "integer"
138+
"type": [
139+
"integer",
140+
"null"
141+
]
106142
},
107143
"window_inner_width": {
108144
"description": "The interior width of the window in pixels. This includes the width of the vertical scroll bar, if one is present.",
109-
"type": "integer"
145+
"type": [
146+
"integer",
147+
"null"
148+
]
110149
}
111150
},
112151
"required": [

0 commit comments

Comments
 (0)