зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1766092 - Provide URIs and paths to feature schemas r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D144505
This commit is contained in:
Родитель
008aee9522
Коммит
a905fbd820
|
@ -486,7 +486,9 @@ cfr:
|
|||
hasExposure: true
|
||||
exposureDescription: "Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
isEarlyStartup: false
|
||||
schema: "resource://activity-stream/schemas/CFR/ExtensionDoorhanger.schema.json"
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/CFR/ExtensionDoorhanger.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/templates/CFR/templates/ExtensionDoorhanger.schema.json"
|
||||
variables: {}
|
||||
"moments-page":
|
||||
description: "Message with URL data for Messaging System"
|
||||
|
@ -494,7 +496,9 @@ cfr:
|
|||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
isEarlyStartup: false
|
||||
schema: "resource://activity-stream/schemas/OnboardingMessage/UpdateAction.schema.json"
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/OnboardingMessage/UpdateAction.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/UpdateAction.schema.json"
|
||||
variables: {}
|
||||
infobar:
|
||||
description: "Message template for Messaging System"
|
||||
|
@ -502,7 +506,9 @@ infobar:
|
|||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
isEarlyStartup: false
|
||||
schema: "resource://activity-stream/schemas/CFR/InfoBar.schema.json"
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/CFR/InfoBar.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/templates/CFR/templates/InfoBar.schema.json"
|
||||
variables: {}
|
||||
spotlight:
|
||||
description: "Modal message template for Messaging System"
|
||||
|
@ -510,7 +516,9 @@ spotlight:
|
|||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
isEarlyStartup: false
|
||||
schema: "resource://activity-stream/schemas/OnboardingMessage/Spotlight.schema.json"
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/OnboardingMessage/Spotlight.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/Spotlight.schema.json"
|
||||
variables: {}
|
||||
pbNewtab:
|
||||
description: Message shown on the PB newtab for Messaging System
|
||||
|
@ -518,7 +526,9 @@ pbNewtab:
|
|||
exposureDescription: >-
|
||||
Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched.
|
||||
isEarlyStartup: false
|
||||
schema: "resource://activity-stream/schemas/PBNewtab/NewtabPromoMessage.schema.json"
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/PBNewtab/NewtabPromoMessage.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/templates/PBNewtab/NewtabPromoMessage.schema.json"
|
||||
variables: {}
|
||||
syncAfterTabChange:
|
||||
description: "Schedule a sync after any tab change"
|
||||
|
|
|
@ -363,8 +363,8 @@ class _RemoteSettingsExperimentLoader {
|
|||
let validator;
|
||||
if (validatorCache[featureId]) {
|
||||
validator = validatorCache[featureId];
|
||||
} else if (NimbusFeatures[featureId].manifest.schema) {
|
||||
const uri = NimbusFeatures[featureId].manifest.schema;
|
||||
} else if (NimbusFeatures[featureId].manifest.schema?.uri) {
|
||||
const uri = NimbusFeatures[featureId].manifest.schema.uri;
|
||||
try {
|
||||
const schema = await fetch(uri, { credentials: "omit" }).then(rsp =>
|
||||
rsp.json()
|
||||
|
|
|
@ -22,8 +22,20 @@
|
|||
"description": "If the feature values should be cached in prefs for fast early startup."
|
||||
},
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"description": "For features with large number of variables we instead point to a JSONSchema file instead of specifying them in the variables field"
|
||||
"type": "object",
|
||||
"description": "For features with large number of variables we instead point to a JSONSchema file instead of specifying them in the variables field",
|
||||
"properties": {
|
||||
"uri": {
|
||||
"type": "string",
|
||||
"description": "A resource:// URI that can be loaded at runtime from within Firefox.",
|
||||
"format": "uri"
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "The path to the schema file relative to the repository root"
|
||||
}
|
||||
},
|
||||
"required": ["uri", "path"]
|
||||
},
|
||||
"variables": {
|
||||
"additionalProperties": false,
|
||||
|
|
Загрузка…
Ссылка в новой задаче