{"id":21635076,"url":"https://github.com/prsprsbk/ffext-manifest-schema","last_synced_at":"2026-05-10T15:34:25.617Z","repository":{"id":57234894,"uuid":"178988835","full_name":"PrsPrsBK/ffext-manifest-schema","owner":"PrsPrsBK","description":"JSON Schema for manifest.json of Firefox WebExtensions.","archived":false,"fork":false,"pushed_at":"2021-08-27T13:50:50.000Z","size":322,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T19:19:20.409Z","etag":null,"topics":["firefox","json-schema","webextensions"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ffext-manifest-schema","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PrsPrsBK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE/LICENSE_Chromium","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-02T03:06:38.000Z","updated_at":"2021-08-27T13:50:53.000Z","dependencies_parsed_at":"2022-08-23T15:50:37.702Z","dependency_job_id":null,"html_url":"https://github.com/PrsPrsBK/ffext-manifest-schema","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrsPrsBK%2Fffext-manifest-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrsPrsBK%2Fffext-manifest-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrsPrsBK%2Fffext-manifest-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrsPrsBK%2Fffext-manifest-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrsPrsBK","download_url":"https://codeload.github.com/PrsPrsBK/ffext-manifest-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244320323,"owners_count":20434090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firefox","json-schema","webextensions"],"created_at":"2024-11-25T03:19:27.443Z","updated_at":"2026-05-10T15:34:25.549Z","avatar_url":"https://github.com/PrsPrsBK.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"* JSON Schema for Firefox WebExtensions.\n* for ones who want to catch up new versions. npm package is based on nightly (mozilla-central).\n* I do not think that this package is useful for Google Chrome's manifest.json, \n  so this package is prefixed as 'firefox'.\n* status: raughly O.K.\n\n\n## how to use\n\nAs for VS Code's workspace config, such as `foo.code-workspace`\n\n```\n  {\n    \"settings\": {\n      \"json.schemas\": [\n        {\n          \"fileMatch\": [\"*/path/to/manifest.json\"],\n          \"url\": \"./path/to/ffext.min.json\",\n        }\n      ]\n    }\n  }\n```\n\nThen you will get:\n\n![ManifestKey](images/Readme_ManifestKey.png)\n![Permission](images/Readme_Permission.png)\n\n\n## how to make JSON Schema file\n\n```console\n$ npm run build -- --mozilla-repo /path/to/mozilla\n```\n\n# Known Issue\n\n## `//` comment\n\nOne-line comment is allowed (only Firefox?), but I can not specify it in the JSON Scheme.\n\n## `default_locale`\n\nFor `default_locale`, to be mandatory or prohibited is conditional.\nIts condition cannot be described in this JSON Schema, because it involves the existence of `_locales` directory.\n\n## Warning \"Matches multiple schemas when only one must validate\"\n\nVS Code's validator does not discriminate objects inside `oneOf`\nand result in that warning on `background` or so.\n\n```sample.json\n  {\n    \"two different subschema cannot be discriminated.\"\n    \"background\": {\n      \"oneOf\": [\n        {\n          \"type\": \"object\",\n          \"properties\": {\n            \"page\": {\n              \"type\": \"number\"\n            }\n          }\n        },\n        {\n          \"type\": \"object\",\n          \"properties\": {\n            \"scripts\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/ExtensionURL\"\n              }\n            },\n            \"persistent\": {\n              \"$ref\": \"#/definitions/PersistentBackgroundProperty\"\n            }\n          }\n        }\n      ]\n    }\n  }\n```\n\nc.f. [Combining schemas — Understanding JSON Schema 7.0 documentation](https://json-schema.org/understanding-json-schema/reference/combining.html)\n\n\n## `format` may result in error or warning\n\n\nJSON Schema Document says \"JSON Schema implementations are not required to implement this part of the specification, and many of them do not\".\n\nAs for VS Code, validator seems to do nothing for `format`.\n\nSo, this schema currently does nothing for it, and non-standard `format`\nsuch as `strictRelativeUrl` remains in.\n\nc.f. [string — Understanding JSON Schema 7.0 documentation](https://json-schema.org/understanding-json-schema/reference/string.html)\n\n\n## Note for implementation\n\n### `$id` does not work\n\nJSON Schema Document says \"This functionality isn’t currently supported by the Python jsonschema library\".\n\nI do not know about VS Code's JSON Schema Validator, but anyway it does not handle `$id`.\n\nc.f. [Structuring a complex schema — Understanding JSON Schema 7.0 documentation](https://json-schema.org/understanding-json-schema/structuring.html)\n\n\n### 'match mode (?i)' of RegExp\n\nFor the case of `string` type, it can have `pattern` keyword.\nJSON Schema does not handle it, and that results in RegExp error.\n\n\n# Reference\n\nsome useful staff.\n\n* [manifest.json - Mozilla | MDN](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json)\n\n* [pkcs11 - Mozilla | MDN](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/pkcs11)\n\n* [API Implementation Basics — Mozilla Source Tree Docs 68.0a1 documentation](https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/basics.html#webextensions-experiments)\n\n  For `experiments`.\n\n* [API Schemas — Mozilla Source Tree Docs 68.0a1 documentation](https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/schema.html)\n\n  This says \"Refer to the documentation and examples at the JSON Schema site for details on how these items are defined in a schema\".\n  But some items in API schema (e.g. `choices`) does not match with specs of all versions like 4.0 or 7.0 currently (2019 March) on that site.\n\n* mozilla-central (or mozilla-beta or so)'s `toolkit/components/extensions/Schemas.jsm`\n\n  This module handles `preprocess`, `optional` or so.\n\n\n# License\nMPL-2.0.\n\nnpm package includes json files. These contains contents which come from \njson schema files of mozilla-central repository. \nSome ones are under 3-Clause BSD License, others are under MPL-2.0 License. \nBoth are in `License` directory.\n\n# Release Notes\n\n* 2019-04-02 0.1.0\n* 2019-04-28 0.2.0 `chrome_settings_overrides`: `search_url_get_params`, `suggest_url_get_params`, `search_form`\n* 2019-05-09 0.3.0 New `captivePortal` Api. Deleted `icons` of `ThemeType`.\n  [1545159](https://bugzilla.mozilla.org/show_bug.cgi?id=1545159)\n* 2019-05-19 0.4.0 fix: 10 permissions are not included.\n\n  * `downloads.open`, `management`, `nativeMessaging`, `theme`, `webRequestBlocking`, `devtools`, `menus.overrideContext`, `activeTab`, `tabs`, `tabHide`\n\n* 2019-05-19 0.4.1 fix: again\n* 2019-06-01 0.5.0 New: `urlbar` API\n  [1547285](https://bugzilla.mozilla.org/show_bug.cgi?id=1547285)\n* 2019-06-15 0.6.0 new `edge` property of `browser_specific_settings`\n  [1542351](https://bugzilla.mozilla.org/show_bug.cgi?id=1542351)\n* 2019-06-28 0.7.0 New: normandyAddonStudy.json\n  [1522214](https://bugzilla.mozilla.org/show_bug.cgi?id=1522214)\n* 2019-07-05 No Release\n  * `topSites` API moved from `toolkit/` to `browser`\n* 2019-07-24 0.8.0 New: `networkStatus` permission\n  [1550605](https://bugzilla.mozilla.org/show_bug.cgi?id=1550605)\n* 2019-08-19 0.9.0 New: `activityLog` permission\n  [1542403](https://bugzilla.mozilla.org/show_bug.cgi?id=1542403)\n* 2019-09-12 0.10.0 New: `memory` permission\n  [1296898](https://bugzilla.mozilla.org/show_bug.cgi?id=1296898)\n* 2019-10-09 0.11.0 Removal: `memory` permission\n* 2019-11-01 (NO RELEASE) New: `OnClickData`\n  [1405031](https://bugzilla.mozilla.org/show_bug.cgi?id=1405031)\n* 2019-11-04 0.12.0 Add: `content_security_policy` may be `{ \"extension_pages\":xxxx, \"content_scripts\":xxxx }`\n  [1581609](https://bugzilla.mozilla.org/show_bug.cgi?id=1581609)\n* 2019-11-08 0.13.0 New property: `l10n_resources`\n  [1457865](https://bugzilla.mozilla.org/show_bug.cgi?id=1457865)\n* 2019-11-16 0.14.0 \n  Change: `chrome_settings_overrides`: `search_provider`: format of `favicon_url` changed from `url` to `relativeUrl`\n  [1571110](https://bugzilla.mozilla.org/show_bug.cgi?id=1571110)\n* 2019-11-24 0.15.0\n  Removal: `OnClickData` (fix for 2019-11-01 #1405031)\n  [1595931](https://bugzilla.mozilla.org/show_bug.cgi?id=1595931)\n* 2020-01-31 0.16.0 New property: `isolated_world` of `content_security_policy`\n  [1594232](https://bugzilla.mozilla.org/show_bug.cgi?id=1594232)\n* 2020-03-05 0.17.0 New permission: `privacy`\n  [1618399](https://bugzilla.mozilla.org/show_bug.cgi?id=1618399)\n\n* 2020-10-26 0.18.0 very many changes from April To October. \n\n  * Permission [1630413](https://bugzilla.mozilla.org/show_bug.cgi?id=1630413)\n  * OptionalPermission [1622917](https://bugzilla.mozilla.org/show_bug.cgi?id=1622917)\n\n* 2021-01-23 0.19.0\n\n  * Removal: `content_scripts` and `isolated_world` properties of `content_security_policy`\n    [1594234](https://bugzilla.mozilla.org/show_bug.cgi?id=1594234)\n  * Change: pattern of `suggest_url`of `search_provider` property of `chrome_settings_overrides`\n  [1687313](https://bugzilla.mozilla.org/show_bug.cgi?id=1687313)\n  (You may see \"Access Denied - You are not authorized to access bug 1687313. To see this bug, you must first log in to an account with the appropriate permissions.\")\n\n* 2021-02-03 0.19.1 fix: some permissions are not included, e.g. `activeTab`\n\n* 2021-02-06 No Update\n\n  * Change: `nativeMessaging` became optional permission\n    [1630415](https://bugzilla.mozilla.org/show_bug.cgi?id=1630415)\n\n* 2021-03-18 0.20.0 New: `ftp` for `protocol_handlers`\n\n  [1626365](https://bugzilla.mozilla.org/show_bug.cgi?id=1626365)\n\n* 2021-04-21 No Update\n\n  * Change: docstring of `toolbar_field_separator` of `colors` of `ThemeType`\n    [1703590](https://bugzilla.mozilla.org/show_bug.cgi?id=1703590)\n\n* 2021-04-24 0.21.0 New: `matrix` scheme of `protocol` of `ProtocolHandler`\n  [1688030](https://bugzilla.mozilla.org/show_bug.cgi?id=1688030)\n\n* 2021-05-02 No Update\n\n  * Change: `chrome_settings_overrides` - `search_provider.favicon_url` can be \"strictRelativeUrl\" on ManifestV3.\n    This has no effect because JSON Schema meta-spec (draft 7, and its validators) does not know Mozilla's \"format\"s.\n    [1697059](https://bugzilla.mozilla.org/show_bug.cgi?id=1697059)\n  * Change: `content_security_policy` has version specs(`max_manifest_version` and `min...`), but currently this Schema does not handle them.\n    Maybe [draft 7's `if-then-else`](https://json-schema.org/understanding-json-schema/reference/conditionals.html) resolves this.\n    [1696043](https://bugzilla.mozilla.org/show_bug.cgi?id=1696043)\n\n* 2021-05-15 0.22.0 New: object `{ resources: [string], matches: [string] }` array for `web_accessible_resources` (ManifestV3)\n    [1696580](https://bugzilla.mozilla.org/show_bug.cgi?id=1696580)\n    [1697334](https://bugzilla.mozilla.org/show_bug.cgi?id=1697334)\n\n* 2021-06-17 0.23.0 Rename: `browserAction` API to `action` API only on Manifest V3.\n  On Manifest V2, `browserAction` API still remains.\n  **This schema file does not handle whether Manifest V is 2 or 3.**\n  So, the properties of both API are available.\n  [1706398](https://bugzilla.mozilla.org/show_bug.cgi?id=1706398)\n\n* 2021-06-25 0.24.0 New: `extensions` array for `web_accessible_resources` (ManifestV3)\n  [1711168](https://bugzilla.mozilla.org/show_bug.cgi?id=1711168)\n\n* 2021-07-08 0.25.0 Removed(0.24.0): : `extensions` array for `web_accessible_resources` (ManifestV3)\n  [1711168](https://bugzilla.mozilla.org/show_bug.cgi?id=1711168)\n\n* 2021-07-26 0.26.0 New: `host_permissions` for ManifestV3\n  [1693385](https://bugzilla.mozilla.org/show_bug.cgi?id=1693385)\n\n* 2021-08-27 No Update\n\n  * New: `resetScrollPosition` property of argument of `captureTab()` and `captureVisibleTab()` of `tabs` API.\n    [1708403](https://bugzilla.mozilla.org/show_bug.cgi?id=1708403)\n\n[//]: # (vim:expandtab ff=unix fenc=utf-8 sw=2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprsprsbk%2Fffext-manifest-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprsprsbk%2Fffext-manifest-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprsprsbk%2Fffext-manifest-schema/lists"}