registration: Improve ResourceModules schema definition
authorKunal Mehta <legoktm@gmail.com>
Fri, 29 May 2015 23:06:10 +0000 (16:06 -0700)
committerAlex Monk <krenair@gmail.com>
Sat, 30 May 2015 00:14:08 +0000 (00:14 +0000)
* "-" is a valid character in module names
* debugScripts, loaderScripts, dependencies, and messages can all be
strings in addition to arrays.

Change-Id: I76570ebf1cb02ca51c5185d4b0c48a553a0e7d2f

docs/extension.schema.json

index a2ff64e..c4d0513 100644 (file)
                        "description": "ResourceLoader modules to register",
                        "additionalProperties": false,
                        "patternProperties": {
-                               "^[a-zA-Z0-9\\.]+$": {
+                               "^[a-zA-Z0-9-\\.]+$": {
                                        "type": "object",
                                        "description": "A single ResourceLoader module descriptor",
                                        "properties": {
                                                        }
                                                },
                                                "debugScripts": {
-                                                       "type": "array",
+                                                       "type": ["string", "array"],
                                                        "description": "Scripts to include in debug contexts",
                                                        "items": {
                                                                "type": "string"
                                                        }
                                                },
                                                "loaderScripts": {
-                                                       "type": "array",
+                                                       "type": ["string", "array"],
                                                        "description": "Scripts to include in the startup module",
                                                        "items": {
                                                                "type": "string"
                                                        }
                                                },
                                                "dependencies": {
-                                                       "type": "array",
+                                                       "type": ["string", "array"],
                                                        "description": "Modules which must be loaded before this module",
                                                        "items": {
                                                                "type": "string"
                                                        }
                                                },
                                                "messages": {
-                                                       "type": "array",
+                                                       "type": ["string", "array"],
                                                        "description": "Messages to always load",
                                                        "items": {
                                                                "type": "string"