Bug 1426259: Create common base object for webextensions manifest schema r=kmag
authorAndrew Swan <aswan@mozilla.com>
Tue, 19 Dec 2017 14:53:07 -0800
changeset 448993 81d875f176380a2ab705c32dd9c564264c330a47
parent 448992 c297a0420e143149ef7f501ff940abdddcc42309
child 448994 50192b2fe1d4c7b7c88cd5628591f1df452887ff
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1426259
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1426259: Create common base object for webextensions manifest schema r=kmag MozReview-Commit-ID: 3KcGEZbIf1G
toolkit/components/extensions/schemas/manifest.json
--- a/toolkit/components/extensions/schemas/manifest.json
+++ b/toolkit/components/extensions/schemas/manifest.json
@@ -1,34 +1,24 @@
 [
   {
     "namespace": "manifest",
     "permissions": [],
     "types": [
       {
-        "id": "WebExtensionManifest",
+        "id": "ManifestBase",
         "type": "object",
-        "description": "Represents a WebExtension manifest.json file",
+        "description": "Common properties for all manifest.json files",
         "properties": {
           "manifest_version": {
             "type": "integer",
             "minimum": 2,
             "maximum": 2
           },
 
-          "minimum_chrome_version":{
-            "type": "string",
-            "optional": true
-          },
-
-          "minimum_opera_version":{
-            "type": "string",
-            "optional": true
-          },
-
           "applications": {
             "type": "object",
             "optional": true,
             "properties": {
               "gecko": {
                 "$ref": "FirefoxSpecificProperties",
                 "optional": true
               }
@@ -76,16 +66,34 @@
             "optional": false
           },
 
           "homepage_url": {
             "type": "string",
             "format": "url",
             "optional": true,
             "preprocess": "localize"
+          }
+        }
+      },
+      {
+        "id": "WebExtensionManifest",
+        "type": "object",
+        "description": "Represents a WebExtension manifest.json file",
+
+        "$import": "ManifestBase",
+        "properties": {
+          "minimum_chrome_version":{
+            "type": "string",
+            "optional": true
+          },
+
+          "minimum_opera_version":{
+            "type": "string",
+            "optional": true
           },
 
           "icons": {
             "type": "object",
             "optional": true,
             "patternProperties": {
               "^[1-9]\\d*$": { "type": "string" }
             }
@@ -215,75 +223,19 @@
         },
 
         "additionalProperties": { "$ref": "UnrecognizedProperty" }
       },
       {
         "id": "WebExtensionLangpackManifest",
         "type": "object",
         "description": "Represents a WebExtension language pack manifest.json file",
+
+        "$import": "ManifestBase",
         "properties": {
-          "manifest_version": {
-            "type": "integer",
-            "minimum": 2,
-            "maximum": 2
-          },
-
-          "applications": {
-            "type": "object",
-            "optional": true,
-            "properties": {
-              "gecko": {
-                "$ref": "FirefoxSpecificProperties",
-                "optional": true
-              }
-            }
-          },
-
-          "browser_specific_settings": {
-            "type": "object",
-            "optional": true,
-            "properties": {
-              "gecko": {
-                "$ref": "FirefoxSpecificProperties",
-                "optional": true
-              }
-            }
-          },
-
-          "name": {
-            "type": "string",
-            "optional": false,
-            "preprocess": "localize"
-          },
-
-          "short_name": {
-            "type": "string",
-            "optional": true,
-            "preprocess": "localize"
-          },
-
-          "description": {
-            "type": "string",
-            "optional": true,
-            "preprocess": "localize"
-          },
-
-          "author": {
-            "type": "string",
-            "optional": true,
-            "preprocess": "localize",
-            "onError": "warn"
-          },
-
-          "version": {
-            "type": "string",
-            "optional": false
-          },
-
           "homepage_url": {
             "type": "string",
             "format": "url",
             "optional": true,
             "preprocess": "localize"
           },
 
           "langpack_id": {