From 341bd5d6e91067ac230379bd6b157b4a6f53c23c Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Fri, 8 Feb 2019 12:13:49 -0800 Subject: [PATCH] registration: Allow @-prefixed keys in manifest_version 2 As specified in . Bug: T215650 Change-Id: I2ff523828389fbec39cdf7c55046e7da901a2ecb --- docs/extension.schema.v2.json | 6 ++++++ tests/phpunit/data/registration/good.json | 9 +++++++++ 2 files changed, 15 insertions(+) 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 } -- 2.20.1