From 72b06d8f7e091364aa0345a3ff4c71508f05828d Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 25 Apr 2016 15:48:54 -0700 Subject: [PATCH] registration: Improve schema validation for some properties Adds more detailed validation for a few different properties. Change-Id: Ie379fffcf79b451900a69564d4e80a5b5599ab87 --- docs/extension.schema.json | 51 ++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/docs/extension.schema.json b/docs/extension.schema.json index f1decd3d0d..3c2c057b7f 100644 --- a/docs/extension.schema.json +++ b/docs/extension.schema.json @@ -563,7 +563,10 @@ }, "TrackingCategories": { "type": "array", - "description": "Tracking category message keys" + "description": "Tracking category message keys", + "items": { + "type": "string" + } }, "DefaultUserOptions": { "type": "object", @@ -571,15 +574,38 @@ }, "HiddenPrefs": { "type": "array", - "description": "Preferences users cannot set" + "description": "Preferences users cannot set", + "items": { + "type": "string" + } }, "GroupPermissions": { "type": "object", - "description": "Default permissions to give to user groups" + "description": "Default permissions to give to user groups", + "patternProperties": { + "^[a-z]+$": { + "type": "object", + "patternProperties": { + "^[a-z]+$": { + "type": "boolean" + } + } + } + } }, "RevokePermissions": { "type": "object", - "description": "Default permissions to revoke from user groups" + "description": "Default permissions to revoke from user groups", + "patternProperties": { + "^[a-z]+$": { + "type": "object", + "patternProperties": { + "^[a-z]+$": { + "type": "boolean" + } + } + } + } }, "ImplicitGroups": { "type": "array", @@ -603,11 +629,19 @@ }, "AvailableRights": { "type": "array", - "description": "User rights added by the extension" + "description": "User rights added by the extension", + "items": { + "type": "string" + } }, "ContentHandlers": { "type": "object", - "description": "Mapping of model ID to class name" + "description": "Mapping of model ID to class name", + "patternProperties": { + "^[A-Za-z]+$": { + "type": "string" + } + } }, "RateLimits": { "type": "object", @@ -626,7 +660,10 @@ "array", "string" ], - "description": "Function to call after setup has finished" + "description": "Function to call after setup has finished", + "items": { + "type": "string" + } }, "ExtensionMessagesFiles": { "type": "object", -- 2.20.1