X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=docs%2Fextension.schema.json;h=1d78eccfc907ad4e6e1f7becc82d3070fc5e1a93;hb=6b79105034ecc1abae6cf458380d283580480a32;hp=e03c2951bb12eda63f36c64650f56f06df30ebbd;hpb=02d026e89330cec63d98631e843a24143abce7ae;p=lhc%2Fweb%2Fwiklou.git diff --git a/docs/extension.schema.json b/docs/extension.schema.json index e03c2951bb..1d78eccfc9 100644 --- a/docs/extension.schema.json +++ b/docs/extension.schema.json @@ -3,6 +3,11 @@ "description": "MediaWiki extension.json schema", "type": "object", "properties": { + "manifest_version": { + "type": "integer", + "description": "Version of the extension.json schema the extension.json file is in.", + "required": true + }, "name": { "type": "string", "description": "The extension's canonical name.", @@ -15,19 +20,7 @@ "type": { "type": "string", "description": "The extension's type, as an index to $wgExtensionCredits.", - "default": "other", - "enum": [ - "api", - "antispam", - "datavalues", - "media", - "parserhook", - "semantic", - "skin", - "specialpage", - "variable", - "other" - ] + "default": "other" }, "author": { "type": [ @@ -37,8 +30,7 @@ "description": "Extension's authors.", "items": { "type": "string" - }, - "additionalItems": false + } }, "version": { "type": "string", @@ -297,12 +289,12 @@ } } }, - "ResourceLoaderModules": { + "ResourceModules": { "type": "object", "description": "ResourceLoader modules to register", "additionalProperties": false, "patternProperties": { - "^[a-zA-Z0-9\\.]+$": { + "^[a-zA-Z0-9-\\.]+$": { "type": "object", "description": "A single ResourceLoader module descriptor", "properties": { @@ -319,7 +311,7 @@ "description": "Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath" }, "scripts": { - "type": "array", + "type": ["string", "array"], "description": "Scripts to always include (array of file paths)", "items": { "type": "string" @@ -356,28 +348,28 @@ } }, "debugScripts": { - "type": "array", + "type": ["string", "array"], "description": "Scripts to include in debug contexts", "items": { "type": "string" } }, "loaderScripts": { - "type": "array", + "type": ["string", "array"], "description": "Scripts to include in the startup module", "items": { "type": "string" } }, "dependencies": { - "type": "array", + "type": ["string", "array"], "description": "Modules which must be loaded before this module", "items": { "type": "string" } }, "styles": { - "type": "array", + "type": ["string", "array", "object"], "description": "Styles to always load", "items": { "type": "string" @@ -399,7 +391,7 @@ } }, "messages": { - "type": "array", + "type": ["string", "array"], "description": "Messages to always load", "items": { "type": "string" @@ -416,6 +408,10 @@ "bottom", "top" ] + }, + "templates": { + "type": "object", + "description": "Templates to be loaded for client-side usage" } } } @@ -446,40 +442,52 @@ "description": "Registry of factory functions to create Config objects" }, "namespaces": { - "type": "object", + "type": "array", "description": "Method to add extra namespaces", - "properties": { - "id": { - "type": "integer" - }, - "constant": { - "type": "string" - }, - "name": { - "type": "string" - }, - "gender": { - "type": "object", - "properties": { - "male": { - "type": "string" - }, - "female": { - "type": "string" + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "constant": { + "type": "string" + }, + "name": { + "type": "string" + }, + "gender": { + "type": "object", + "properties": { + "male": { + "type": "string" + }, + "female": { + "type": "string" + } } + }, + "subpages": { + "type": "boolean", + "default": false + }, + "content": { + "type": "boolean", + "default": false + }, + "defaultcontentmodel": { + "type": "string" + }, + "protection": { + "type": ["string", "array"], + "description": "Userright(s) required to edit in this namespace" + }, + "capitallinkoverride": { + "type": "boolean", + "description": "Set $wgCapitalLinks on a per-namespace basis" } }, - "subpages": { - "type": "boolean", - "default": false - }, - "content": { - "type": "boolean", - "default": false - }, - "defaultcontentmodel": { - "type": "string" - } + "required": ["id", "constant", "name"] } }, "TrackingCategories": { @@ -564,10 +572,6 @@ "type": "object", "description": "SpecialPages implemented in this extension (mapping of page name to class name)" }, - "SpecialPageGroups": { - "type": "object", - "description": "Mapping of special page name to group it belongs to" - }, "AutoloadClasses": { "type": "object" }, @@ -587,7 +591,7 @@ "type": "object" }, "FilterLogTypes": { - "type": "array" + "type": "object" }, "LogNames": { "type": "object" @@ -622,6 +626,9 @@ "ValidSkinNames": { "type": "object" }, + "SkinOOUIThemes": { + "type": "object" + }, "callback": { "type": [ "array", @@ -631,7 +638,24 @@ }, "config": { "type": "object", - "description": "Configuration options for this extension" + "description": "Configuration options for this extension", + "patternProperties": { + "^[a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*$": { + "type": ["object", "array", "string", "integer", "null", "boolean"], + "properties": { + "_merge_strategy": { + "type": "string", + "enum": [ + "array_merge_recursive", + "array_plus_2d", + "array_plus", + "array_merge" + ], + "default": "array_merge" + } + } + } + } }, "ParserTestFiles": { "type": "array",