From: Kunal Mehta Date: Mon, 25 Apr 2016 22:48:54 +0000 (-0700) Subject: registration: Improve schema validation for some properties X-Git-Tag: 1.31.0-rc.0~7172^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=72b06d8f7e091364aa0345a3ff4c71508f05828d;p=lhc%2Fweb%2Fwiklou.git registration: Improve schema validation for some properties Adds more detailed validation for a few different properties. Change-Id: Ie379fffcf79b451900a69564d4e80a5b5599ab87 --- 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",