Skip to content

Commit

Permalink
Rebuild schemas to add "null" as an allowed type for non-required pro…
Browse files Browse the repository at this point in the history
…perties.
  • Loading branch information
sean-rose committed May 2, 2024
1 parent a9420aa commit 6becf29
Show file tree
Hide file tree
Showing 102 changed files with 20,933 additions and 5,298 deletions.
63 changes: 50 additions & 13 deletions schemas/activity-stream/events/events.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
"properties": {
"action_position": {
"description": "A zero based integer indicating the position of this event",
"type": "integer"
"type": [
"integer",
"null"
]
},
"addon_version": {
"type": "string"
},
"browser_session_id": {
"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",
"type": "string"
"type": [
"string",
"null"
]
},
"client_id": {
"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}$",
Expand All @@ -42,7 +48,10 @@
"type": "object"
},
"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.",
"type": "object"
"type": [
"object",
"null"
]
},
"locale": {
"type": "string"
Expand All @@ -55,38 +64,66 @@
"unknown",
"n/a",
"both",
"https://newtab.firefoxchina.cn/newtab/as/activity-stream.html"
"https://newtab.firefoxchina.cn/newtab/as/activity-stream.html",
null
],
"type": "string"
"type": [
"string",
"null"
]
},
"profile_creation_date": {
"type": "integer"
"type": [
"integer",
"null"
]
},
"region": {
"type": "string"
"type": [
"string",
"null"
]
},
"release_channel": {
"type": "string"
"type": [
"string",
"null"
]
},
"session_id": {
"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.",
"pattern": "^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$|^n/a$",
"type": "string"
"type": [
"string",
"null"
]
},
"shield_id": {
"description": "[DEPRECATED]: use `experiments` instead. A semicolon separated string to store a list of Shield study IDs",
"type": "string"
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
"type": [
"string",
"null"
]
},
"user_prefs": {
"description": "An encoded integer representing user's preferences of Activity Stream",
"type": "integer"
"type": [
"integer",
"null"
]
},
"value": {
"description": "A string that describes the context about this event",
"type": "string"
"type": [
"string",
"null"
]
},
"version": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@
},
"block": {
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
"type": "integer"
"type": [
"integer",
"null"
]
},
"click": {
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
"type": "integer"
"type": [
"integer",
"null"
]
},
"experiments": {
"additionalProperties": {
Expand All @@ -34,7 +40,10 @@
"type": "object"
},
"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.",
"type": "object"
"type": [
"object",
"null"
]
},
"impression_id": {
"description": "A UUID representing this user. Note that it's not client_id, nor can it be used to link to a client_id",
Expand All @@ -43,7 +52,10 @@
},
"loaded": {
"description": "An integer to record the size of the loaded 'tiles' list",
"type": "integer"
"type": [
"integer",
"null"
]
},
"locale": {
"type": "string"
Expand All @@ -62,23 +74,41 @@
},
"pocket": {
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
"type": "integer"
"type": [
"integer",
"null"
]
},
"profile_creation_date": {
"type": "integer"
"type": [
"integer",
"null"
]
},
"region": {
"type": "string"
"type": [
"string",
"null"
]
},
"release_channel": {
"type": "string"
"type": [
"string",
"null"
]
},
"shield_id": {
"description": "[DEPRECATED]: use `experiments` instead. A semicolon separated string to store a list of Shield study IDs",
"type": "string"
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
"type": [
"string",
"null"
]
},
"tiles": {
"items": {
Expand All @@ -87,7 +117,10 @@
"type": "integer"
},
"pos": {
"type": "integer"
"type": [
"integer",
"null"
]
}
},
"required": [
Expand All @@ -101,15 +134,24 @@
"type": "integer"
},
"version": {
"type": "string"
"type": [
"string",
"null"
]
},
"window_inner_height": {
"description": "The interior height of the window in pixels, including the height of the horizontal scroll bar, if present",
"type": "integer"
"type": [
"integer",
"null"
]
},
"window_inner_width": {
"description": "The interior width of the window in pixels. This includes the width of the vertical scroll bar, if one is present.",
"type": "integer"
"type": [
"integer",
"null"
]
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@
},
"block": {
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
"type": "integer"
"type": [
"integer",
"null"
]
},
"click": {
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
"type": "integer"
"type": [
"integer",
"null"
]
},
"experiments": {
"additionalProperties": {
Expand All @@ -34,7 +40,10 @@
"type": "object"
},
"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.",
"type": "object"
"type": [
"object",
"null"
]
},
"impression_id": {
"description": "A UUID representing this user. Note that it's not client_id, nor can it be used to link to a client_id",
Expand All @@ -43,7 +52,10 @@
},
"loaded": {
"description": "An integer to record the size of the loaded 'tiles' list",
"type": "integer"
"type": [
"integer",
"null"
]
},
"locale": {
"type": "string"
Expand All @@ -62,19 +74,34 @@
},
"pocket": {
"description": "A 0-based index to record which tile in the 'tiles' list the user just interacted with",
"type": "integer"
"type": [
"integer",
"null"
]
},
"profile_creation_date": {
"type": "integer"
"type": [
"integer",
"null"
]
},
"region": {
"type": "string"
"type": [
"string",
"null"
]
},
"release_channel": {
"type": "string"
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
"type": [
"string",
"null"
]
},
"tiles": {
"items": {
Expand All @@ -84,7 +111,10 @@
"type": "string"
},
"pos": {
"type": "integer"
"type": [
"integer",
"null"
]
}
},
"required": [
Expand All @@ -98,15 +128,24 @@
"type": "integer"
},
"version": {
"type": "string"
"type": [
"string",
"null"
]
},
"window_inner_height": {
"description": "The interior height of the window in pixels, including the height of the horizontal scroll bar, if present",
"type": "integer"
"type": [
"integer",
"null"
]
},
"window_inner_width": {
"description": "The interior width of the window in pixels. This includes the width of the vertical scroll bar, if one is present.",
"type": "integer"
"type": [
"integer",
"null"
]
}
},
"required": [
Expand Down
Loading

0 comments on commit 6becf29

Please sign in to comment.