Source code

Revision control

Copy as Markdown

Other Tools

{
"$comment": "Meta-schema enforced by tests/xpcshell/test_policies_schema.js. Every policy must declare metadata that downstream tooling relies on.",
"type": "object",
"definitions": {
"notes": {
"$comment": "Notes describing compatibility data beyond a basic version number. Accepts a string or an array of strings.",
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
}
]
},
"compatEntry": {
"type": "object",
"required": ["version_added"],
"additionalProperties": false,
"properties": {
"version_added": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d+(\\.\\d+){0,2}$"
},
{
"const": false
}
]
},
"notes": { "$ref": "#/definitions/notes" }
}
}
},
"properties": {
"properties": {
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"description",
"x-category",
"x-compatibility",
"x-restart-required",
"examples"
],
"properties": {
"description": {
"type": "string",
"minLength": 25
},
"x-category": {
"type": "string",
"minLength": 1
},
"x-compatibility": {
"type": "object",
"required": ["firefox", "firefox_esr", "firefox_enterprise"],
"additionalProperties": false,
"properties": {
"firefox": { "$ref": "#/definitions/compatEntry" },
"firefox_esr": { "$ref": "#/definitions/compatEntry" },
"firefox_enterprise": { "$ref": "#/definitions/compatEntry" },
"notes": { "$ref": "#/definitions/notes" }
}
},
"x-restart-required": {
"type": "boolean",
"description": "Whether the policy takes effect only after a restart. Firefox ignores this flag, since it applies all policies once at startup (set it to true for new policies in Firefox); it is consumed only by Firefox Enterprise, which can apply policies live."
},
"examples": {
"type": "array",
"minItems": 1
}
}
}
}
}
}