Merge "Drop zh-tw message "saveprefs""
[lhc/web/wiklou.git] / docs / extension.schema.json
index 34cfe2c..d11635d 100644 (file)
                "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": [
@@ -42,8 +30,7 @@
                        "description": "Extension's authors.",
                        "items": {
                                "type": "string"
-                       },
-                       "additionalItems": false
+                       }
                },
                "version": {
                        "type": "string",
                        "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": {
                                                        "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"
                                                        }
                                                },
                                                "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"
                                                        }
                                                },
                                                "messages": {
-                                                       "type": "array",
+                                                       "type": ["string", "array"],
                                                        "description": "Messages to always load",
                                                        "items": {
                                                                "type": "string"
                                                                "bottom",
                                                                "top"
                                                        ]
+                                               },
+                                               "templates": {
+                                                       "type": "object",
+                                                       "description": "Templates to be loaded for client-side usage"
                                                }
                                        }
                                }
                        "type": "object",
                        "description": "ResourceLoader LESS variables"
                },
-               "ResourceLoaderLESSFunctions": {
-                       "type": "object",
-                       "description": "ResourceLoader LESS functions"
-               },
                "ResourceLoaderLESSImportPaths": {
                        "type": "object",
                        "description": "ResourceLoader import paths"
                        "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": {
                        "type": "object"
                },
                "FilterLogTypes": {
-                       "type": "array"
+                       "type": "object"
                },
                "LogNames": {
                        "type": "object"
                "ValidSkinNames": {
                        "type": "object"
                },
+               "SkinOOUIThemes": {
+                       "type": "object"
+               },
                "callback": {
                        "type": [
                                "array",
                },
                "config": {
                        "type": "object",
-                       "description": "Configuration options for this extension"
+                       "description": "Configuration options for this extension",
+                       "properties": {
+                               "_prefix": {
+                                       "type": "string",
+                                       "default": "wg",
+                                       "description": "Prefix to put in front of configuration settings when exporting them to $GLOBALS"
+                               }
+                       },
+                       "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",