registration: Fix 'ResourceLoaderWikiModule' schema validation
authorKunal Mehta <legoktm@member.fsf.org>
Sat, 23 Feb 2019 01:17:05 +0000 (17:17 -0800)
committerKunal Mehta <legoktm@member.fsf.org>
Sat, 23 Feb 2019 01:17:05 +0000 (17:17 -0800)
There is a full schema for ResourceModules when the
class: ResourceLoaderWikiModule is used. Except it doesn't actually work,
since it it fails validating against that schema, it will continue to check
the other anyOf schemas, find the arbitrary class one, and pass that one.

Blacklisting ResourceLoaderWikiModule from the arbitrary class schema means
that it has to pass the specified schema for it, or fail validation.

I verified that all extensions and skins in Gerrit pass validation with this
patch.

Change-Id: Icb862088c0ca1f89ed5a57a4286dd9049d213021

docs/extension.schema.v1.json
docs/extension.schema.v2.json

index 2174ddb..8cd4e71 100644 (file)
                                                        "properties": {
                                                                "class": {
                                                                        "type": "string",
-                                                                       "pattern": "^(?!ResourceLoader(File|Image)Module).*$"
+                                                                       "pattern": "^(?!ResourceLoader(File|Image|Wiki)Module).*$"
                                                                }
                                                        },
                                                        "required": ["class"]
index d634f70..1d64095 100644 (file)
                                                        "properties": {
                                                                "class": {
                                                                        "type": "string",
-                                                                       "pattern": "^(?!ResourceLoader(File|Image)Module).*$"
+                                                                       "pattern": "^(?!ResourceLoader(File|Image|Wiki)Module).*$"
                                                                }
                                                        },
                                                        "required": ["class"]