Merge "registration: Add schema validation ResourceLoaderWikiModule"
[lhc/web/wiklou.git] / docs / extension.schema.json
index a743afa..11adc61 100644 (file)
                                                                        "type": "string",
                                                                        "description": "Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath"
                                                                },
+                                                               "skipFunction": {
+                                                                       "type": "string",
+                                                                       "description": "Path to a file containing a JavaScript \"skip function\", if desired."
+                                                               },
                                                                "scripts": {
                                                                        "type": ["string", "array"],
                                                                        "description": "Scripts to always include (array of file paths)",
                                                                },
                                                                "group": {
                                                                        "type": "string",
-                                                                       "description": "Group which this module should be loaded together with"
+                                                                       "description": "Group with which this module should be loaded"
                                                                },
                                                                "position": {
                                                                        "type": "string",
                                                                }
                                                        }
                                                },
+                                               {
+                                                       "description": "A ResourceLoaderWikiModule definition",
+                                                       "additionalProperties": false,
+                                                       "properties": {
+                                                               "class": {
+                                                                       "enum": ["ResourceLoaderWikiModule"]
+                                                               },
+                                                               "group": {
+                                                                       "type": "string",
+                                                                       "description": "Group with which this module should be loaded"
+                                                               },
+                                                               "position": {
+                                                                       "type": "string",
+                                                                       "description": "Position on the page to load this module at",
+                                                                       "enum": [
+                                                                               "bottom",
+                                                                               "top"
+                                                                       ]
+                                                               },
+                                                               "targets": {
+                                                                       "type": ["string", "array"],
+                                                                       "description": "ResourceLoader target the module can run on",
+                                                                       "items": {
+                                                                               "type": "string"
+                                                                       }
+                                                               },
+                                                               "scripts": {
+                                                                       "type": "array",
+                                                                       "description": "A list of on-wiki pages containing JavaScript that should be loaded",
+                                                                       "items": {
+                                                                               "type": "string"
+                                                                       }
+                                                               },
+                                                               "styles": {
+                                                                       "type": "array",
+                                                                       "description": "A list of on-wiki pages containing CSS that should be loaded",
+                                                                       "items": {
+                                                                               "type": "string"
+                                                                       }
+                                                               }
+                                                       }
+                                               },
                                                {
                                                        "description": "A ResourceLoaderImageModule definition",
                                                        "additionalProperties": false,
                        "type": "object",
                        "description": "Registry of factory functions to create Config objects"
                },
+               "SessionProviders": {
+                       "type": "object",
+                       "description": "Session providers"
+               },
+               "AuthManagerAutoConfig": {
+                       "type": "object",
+                       "description": "AuthManager auto-configuration",
+                       "additionalProperties": false,
+                       "properties": {
+                               "preauth": {
+                                       "type": "object",
+                                       "description": "Pre-authentication providers"
+                               },
+                               "primaryauth": {
+                                       "type": "object",
+                                       "description": "Primary authentication providers"
+                               },
+                               "secondaryauth": {
+                                       "type": "object",
+                                       "description": "Secondary authentication providers"
+                               }
+                       }
+               },
                "CentralIdLookupProviders": {
                        "type": "object",
                        "description": "Central ID lookup providers"
                },
+               "ChangeCredentialsBlacklist": {
+                       "type": "object",
+                       "description": "AuthenticationRequest classes which can only be used internally for credentials change"
+               },
+               "RemoveCredentialsBlacklist": {
+                       "type": "object",
+                       "description": "AuthenticationRequest classes which can only be used internally for credentials removal"
+               },
                "namespaces": {
                        "type": "array",
                        "description": "Method to add extra namespaces",
                },
                "TrackingCategories": {
                        "type": "array",
-                       "description": "Tracking category message keys"
+                       "description": "Tracking category message keys",
+                       "items": {
+                               "type": "string"
+                       }
                },
                "DefaultUserOptions": {
                        "type": "object",
                },
                "HiddenPrefs": {
                        "type": "array",
-                       "description": "Preferences users cannot set"
+                       "description": "Preferences users cannot set",
+                       "items": {
+                               "type": "string"
+                       }
                },
                "GroupPermissions": {
                        "type": "object",
-                       "description": "Default permissions to give to user groups"
+                       "description": "Default permissions to give to user groups",
+                       "patternProperties": {
+                               "^[a-z]+$": {
+                                       "type": "object",
+                                       "patternProperties": {
+                                               "^[a-z]+$": {
+                                                       "type": "boolean"
+                                               }
+                                       }
+                               }
+                       }
                },
                "RevokePermissions": {
                        "type": "object",
-                       "description": "Default permissions to revoke from user groups"
+                       "description": "Default permissions to revoke from user groups",
+                       "patternProperties": {
+                               "^[a-z]+$": {
+                                       "type": "object",
+                                       "patternProperties": {
+                                               "^[a-z]+$": {
+                                                       "type": "boolean"
+                                               }
+                                       }
+                               }
+                       }
+               },
+               "GrantPermissions": {
+                       "type": "object",
+                       "description": "Map of permissions granted to authorized consumers to their bundles, called 'grants'",
+                       "patternProperties": {
+                               "^[a-z]+$": {
+                                       "type": "object",
+                                       "patternProperties": {
+                                               "^[a-z]+$": {
+                                                       "type": "boolean"
+                                               }
+                                       }
+                               }
+                       }
+               },
+               "GrantPermissionGroups": {
+                       "type": "object",
+                       "description": "Map of grants to their UI grouping",
+                       "patternProperties": {
+                               "^[a-z]+$": {
+                                       "type": "string"
+                               }
+                       }
                },
                "ImplicitGroups": {
                        "type": "array",
                },
                "AvailableRights": {
                        "type": "array",
-                       "description": "User rights added by the extension"
+                       "description": "User rights added by the extension",
+                       "items": {
+                               "type": "string"
+                       }
                },
                "ContentHandlers": {
                        "type": "object",
-                       "description": "Mapping of model ID to class name"
+                       "description": "Mapping of model ID to class name",
+                       "patternProperties": {
+                               "^[A-Za-z]+$": {
+                                       "type": "string"
+                               }
+                       }
                },
                "RateLimits": {
                        "type": "object",
                                "array",
                                "string"
                        ],
-                       "description": "Function to call after setup has finished"
+                       "description": "Function to call after setup has finished",
+                       "items": {
+                               "type": "string"
+                       }
                },
                "ExtensionMessagesFiles": {
                        "type": "object",
                        "type": "object"
                },
                "Hooks": {
-                       "type": "object",
+                       "type": [ "string", "object" ],
                        "description": "Hooks this extension uses (mapping of hook name to callback)"
                },
                "JobClasses": {
                "FilterLogTypes": {
                        "type": "object"
                },
+               "ActionFilteredLogs": {
+                       "type": "object",
+                       "description": "List of log types which can be filtered by log actions",
+                       "patternProperties": {
+                               "^[a-z-]+$": {
+                                       "type": "object",
+                                       "patternProperties": {
+                                               "^[a-z-]+$": {
+                                                       "type": "array",
+                                                       "items": {
+                                                               "type": "string"
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               },
                "LogNames": {
                        "type": "object"
                },