registration: Fix "namespaces" schema to match code
authorKunal Mehta <legoktm@gmail.com>
Sat, 1 Aug 2015 06:01:59 +0000 (23:01 -0700)
committerKunal Mehta <legoktm@gmail.com>
Sat, 1 Aug 2015 06:01:59 +0000 (23:01 -0700)
The "namespaces" property is supposed to be an array of objects, not an
object. Document the properties of the individual objects, and mark the
actually required ones as required.

Change-Id: Ie3cee3e720b962073a1ff098659faa9f11d44fe3

docs/extension.schema.json

index c9f629c..8e6cafd 100644 (file)
                        "description": "Registry of factory functions to create Config objects"
                },
                "namespaces": {
-                       "type": "object",
+                       "type": "array",
                        "description": "Method to add extra namespaces",
-                       "properties": {
-                               "id": {
-                                       "type": "integer"
-                               },
-                               "constant": {
-                                       "type": "string"
-                               },
-                               "name": {
-                                       "type": "string"
-                               },
-                               "gender": {
-                                       "type": "object",
-                                       "properties": {
-                                               "male": {
-                                                       "type": "string"
-                                               },
-                                               "female": {
-                                                       "type": "string"
+                       "items": {
+                               "type": "object",
+                               "properties": {
+                                       "id": {
+                                               "type": "integer"
+                                       },
+                                       "constant": {
+                                               "type": "string"
+                                       },
+                                       "name": {
+                                               "type": "string"
+                                       },
+                                       "gender": {
+                                               "type": "object",
+                                               "properties": {
+                                                       "male": {
+                                                               "type": "string"
+                                                       },
+                                                       "female": {
+                                                               "type": "string"
+                                                       }
                                                }
+                                       },
+                                       "subpages": {
+                                               "type": "boolean",
+                                               "default": false
+                                       },
+                                       "content": {
+                                               "type": "boolean",
+                                               "default": false
+                                       },
+                                       "defaultcontentmodel": {
+                                               "type": "string"
                                        }
                                },
-                               "subpages": {
-                                       "type": "boolean",
-                                       "default": false
-                               },
-                               "content": {
-                                       "type": "boolean",
-                                       "default": false
-                               },
-                               "defaultcontentmodel": {
-                                       "type": "string"
-                               }
+                               "required": ["id", "constant", "name"]
                        }
                },
                "TrackingCategories": {