From: Stanislav Malyshev Date: Fri, 8 Feb 2019 20:13:49 +0000 (-0800) Subject: registration: Allow @-prefixed keys in manifest_version 2 X-Git-Tag: 1.34.0-rc.0~2823^2 X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=commitdiff_plain;h=341bd5d6e91067ac230379bd6b157b4a6f53c23c;p=lhc%2Fweb%2Fwiklou.git registration: Allow @-prefixed keys in manifest_version 2 As specified in . Bug: T215650 Change-Id: I2ff523828389fbec39cdf7c55046e7da901a2ecb --- diff --git a/docs/extension.schema.v2.json b/docs/extension.schema.v2.json index 9da636f4fd..1936cdcb52 100644 --- a/docs/extension.schema.v2.json +++ b/docs/extension.schema.v2.json @@ -3,6 +3,12 @@ "description": "MediaWiki extension.json schema", "type": "object", "additionalProperties": false, + "patternProperties": { + "^@": { + "type": "string", + "description": "Arbitrary notes, ignored by the parser." + } + }, "properties": { "manifest_version": { "type": "integer", diff --git a/tests/phpunit/data/registration/good.json b/tests/phpunit/data/registration/good.json index cfad069c17..8c024661a4 100644 --- a/tests/phpunit/data/registration/good.json +++ b/tests/phpunit/data/registration/good.json @@ -1,5 +1,7 @@ { "name": "FooBar", + "@note": "This is a note", + "@duck": "Docs say any @-item is ignored", "attributes": { "FooBar": { "Attr": [ "test" ] @@ -8,5 +10,12 @@ "Attr": [ "test2" ] } }, + "config": { + "MyConfigValue": { + "value": 42, + "description": "Very important config value", + "public": true + } + }, "manifest_version": 2 }