Merge "mediawiki.Title: Minor optimizations for mw.Title JavaScript code"
[lhc/web/wiklou.git] / docs / extension.schema.v2.json
index 6076581..56d274b 100644 (file)
                },
                "SpecialPages": {
                        "type": "object",
-                       "description": "SpecialPages implemented in this extension (mapping of page name to class name)"
+                       "description": "SpecialPages implemented in this extension (mapping of page name to class name or to ObjectFactory spec)"
                },
                "AutoloadNamespaces": {
                        "type": "object",
                        "type": "object",
                        "description": "Map of skin names to OOUI themes to use. Same format as ResourceLoaderOOUIModule::$builtinSkinThemeMap."
                },
+               "OOUIThemePaths": {
+                       "type": "object",
+                       "description": "Map of custom OOUI theme names to paths to load them from. Same format as ResourceLoaderOOUIModule::$builtinThemePaths.",
+                       "patternProperties": {
+                               "^[A-Za-z]+$": {
+                                       "type": "object",
+                                       "additionalProperties": false,
+                                       "properties": {
+                                               "scripts": {
+                                                       "type": "string",
+                                                       "description": "Path to script file."
+                                               },
+                                               "styles": {
+                                                       "type": "string",
+                                                       "description": "Path to style files. '{module}' will be replaced with the module's name."
+                                               },
+                                               "images": {
+                                                       "type": [ "string", "null" ],
+                                                       "description": "Path to images (optional). '{module}' will be replaced with the module's name."
+                                               }
+                                       }
+                               }
+                       }
+               },
                "PasswordPolicy": {
                        "type": "object",
                        "description": "Password policies"
                        "type": "array",
                        "description": "List of service wiring files to be loaded by the default instance of MediaWikiServices"
                },
+               "RestRoutes": {
+                       "type": "array",
+                       "description": "List of route specifications to be added to the REST API",
+                       "items": {
+                               "type": "object",
+                               "properties": {
+                                       "method": {
+                                               "oneOf": [
+                                                       {
+                                                               "type": "string",
+                                                               "description": "The HTTP method name"
+                                                       },
+                                                       {
+                                                               "type": "array",
+                                                               "items": {
+                                                                       "type": "string",
+                                                                       "description": "An acceptable HTTP method name"
+                                                               }
+                                                       }
+                                               ]
+                                       },
+                                       "path": {
+                                               "type": "string",
+                                               "description": "The path template. This should start with an initial slash, designating the root of the REST API. Path parameters are enclosed in braces, for example /endpoint/{param}."
+                                       },
+                                       "factory": {
+                                               "type": ["string", "array"],
+                                               "description": "A factory function to be called to create the handler for this route"
+                                       },
+                                       "class": {
+                                               "type": "string",
+                                               "description": "The fully-qualified class name of the handler. This should be omitted if a factory is specified."
+                                       },
+                                       "args": {
+                                               "type": "array",
+                                               "description": "The arguments passed to the handler constructor or factory"
+                                       }
+                               }
+                       }
+               },
                "attributes": {
                        "description":"Registration information for other extensions",
                        "type": "object",