Ensure newlines when wrapping ResourceLoader scripts
[mediawiki.git] / docs / extension.schema.v2.json
blobd7e421005fa687921153df4ae2afbf930d57ed61
2         "$schema": "http://json-schema.org/schema#",
3         "description": "MediaWiki extension.json schema",
4         "type": "object",
5         "additionalProperties": false,
6         "patternProperties": {
7                 "^@": {
8                         "type": [
9                                 "string",
10                                 "array"
11                         ],
12                         "description": "Arbitrary notes, ignored by the parser."
13                 }
14         },
15         "properties": {
16                 "manifest_version": {
17                         "type": "integer",
18                         "description": "Version of the extension.json schema the extension.json file is in.",
19                         "required": true
20                 },
21                 "name": {
22                         "type": "string",
23                         "description": "The extension's canonical name.",
24                         "required": true
25                 },
26                 "namemsg": {
27                         "type": "string",
28                         "description": "i18n message key of the extension's name."
29                 },
30                 "type": {
31                         "type": "string",
32                         "description": "The extension's type, as an index to $wgExtensionCredits.",
33                         "default": "other"
34                 },
35                 "author": {
36                         "type": [
37                                 "string",
38                                 "array"
39                         ],
40                         "description": "Extension's authors.",
41                         "items": {
42                                 "type": "string"
43                         }
44                 },
45                 "version": {
46                         "type": "string",
47                         "description": "The version of this release of the extension."
48                 },
49                 "url": {
50                         "type": "string",
51                         "description": "URL to the homepage for the extension.",
52                         "format": "uri-reference"
53                 },
54                 "description": {
55                         "type": "string",
56                         "description": "Raw description of the extension."
57                 },
58                 "descriptionmsg": {
59                         "type": "string",
60                         "description": "Message key for a i18n message describing the extension."
61                 },
62                 "license-name": {
63                         "type": "string",
64                         "description": "SPDX identifier for the license under which the extension is released."
65                 },
66                 "requires": {
67                         "type": "object",
68                         "description": "Indicates what versions of PHP, MediaWiki core, extensions or skins are required. This syntax may be extended in the future, for example to check dependencies between other services.",
69                         "additionalProperties": false,
70                         "properties": {
71                                 "MediaWiki": {
72                                         "type": "string",
73                                         "description": "Version constraint string against MediaWiki core."
74                                 },
75                                 "platform": {
76                                         "type": "object",
77                                         "description": "Indicates version constraints against platform services.",
78                                         "additionalProperties": false,
79                                         "properties": {
80                                                 "php": {
81                                                         "type": "string",
82                                                         "description": "Version constraint string against PHP."
83                                                 },
84                                                 "ability-shell": {
85                                                         "type": "boolean",
86                                                         "default": false,
87                                                         "description": "Whether this extension requires shell access."
88                                                 }
89                                         },
90                                         "patternProperties": {
91                                                 "^ext-": {
92                                                         "type": "string",
93                                                         "description": "Required PHP extension.",
94                                                         "enum": ["*"]
95                                                 }
96                                         }
97                                 },
98                                 "extensions": {
99                                         "type": "object",
100                                         "description": "Set of version constraint strings against specific extensions."
101                                 },
102                                 "skins": {
103                                         "type": "object",
104                                         "description": "Set of version constraint strings against specific skins."
105                                 }
106                         }
107                 },
108                 "dev-requires": {
109                         "type": "object",
110                         "description": "Indicates what dependencies are required for development purposes such as running tests. This syntax may be extended in the future.",
111                         "additionalProperties": false,
112                         "properties": {
113                                 "MediaWiki": {
114                                         "type": "string",
115                                         "description": "Version constraint string against MediaWiki core."
116                                 },
117                                 "platform": {
118                                         "type": "object",
119                                         "description": "Indicates version constraints against platform services.",
120                                         "additionalProperties": false,
121                                         "properties": {
122                                                 "php": {
123                                                         "type": "string",
124                                                         "description": "Version constraint string against PHP."
125                                                 },
126                                                 "ability-shell": {
127                                                         "type": "boolean",
128                                                         "default": false,
129                                                         "description": "Whether this extension requires shell access."
130                                                 }
131                                         },
132                                         "patternProperties": {
133                                                 "^ext-": {
134                                                         "type": "string",
135                                                         "description": "Required PHP extension.",
136                                                         "enum": ["*"]
137                                                 }
138                                         }
139                                 },
140                                 "extensions": {
141                                         "type": "object",
142                                         "description": "Set of version constraint strings against specific extensions."
143                                 },
144                                 "skins": {
145                                         "type": "object",
146                                         "description": "Set of version constraint strings against specific skins."
147                                 }
148                         }
149                 },
150                 "ResourceFileModulePaths": {
151                         "type": "object",
152                         "description": "Default paths to use for all ResourceLoader file modules",
153                         "additionalProperties": false,
154                         "properties": {
155                                 "localBasePath": {
156                                         "type": "string",
157                                         "description": "Base path to prepend to all local paths, relative to current directory"
158                                 },
159                                 "remoteExtPath": {
160                                         "type": "string",
161                                         "description": "Base path to prepend to all remote paths, relative to $wgExtensionAssetsPath"
162                                 },
163                                 "remoteSkinPath": {
164                                         "type": "string",
165                                         "description": "Base path to prepend to all remote paths, relative to $wgStylePath"
166                                 }
167                         }
168                 },
169                 "ResourceModules": {
170                         "type": "object",
171                         "description": "ResourceLoader modules to register",
172                         "patternProperties": {
173                                 "^[a-zA-Z0-9-\\.]+$": {
174                                         "type": "object",
175                                         "anyOf": [
176                                                 {
177                                                         "description": "A ResourceLoaderFileModule definition",
178                                                         "additionalProperties": false,
179                                                         "properties": {
180                                                                 "localBasePath": {
181                                                                         "type": "string",
182                                                                         "description": "Base path to prepend to all local paths in $options. Defaults to $IP"
183                                                                 },
184                                                                 "remoteBasePath": {
185                                                                         "type": "string",
186                                                                         "description": "Base path to prepend to all remote paths in $options. Defaults to $wgScriptPath"
187                                                                 },
188                                                                 "remoteExtPath": {
189                                                                         "type": "string",
190                                                                         "description": "Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath"
191                                                                 },
192                                                                 "skipFunction": {
193                                                                         "type": "string",
194                                                                         "description": "Path to a file containing a JavaScript \"skip function\", if desired."
195                                                                 },
196                                                                 "scripts": {
197                                                                         "type": ["string", "array"],
198                                                                         "description": "Scripts to always include (array of file paths)",
199                                                                         "items": {
200                                                                                 "type": "string"
201                                                                         }
202                                                                 },
203                                                                 "languageScripts": {
204                                                                         "type": "object",
205                                                                         "description": "Scripts to include in specific language contexts (mapping of language code to file path(s))",
206                                                                         "patternProperties": {
207                                                                                 "^[a-zA-Z0-9-]{2,}$": {
208                                                                                         "type": [
209                                                                                                 "string",
210                                                                                                 "array"
211                                                                                         ],
212                                                                                         "items": {
213                                                                                                 "type": "string"
214                                                                                         }
215                                                                                 }
216                                                                         }
217                                                                 },
218                                                                 "skinScripts": {
219                                                                         "type": "object",
220                                                                         "description": "Scripts to include in specific skin contexts (mapping of skin name to script(s)",
221                                                                         "patternProperties": {
222                                                                                 ".+": {
223                                                                                         "type": [
224                                                                                                 "string",
225                                                                                                 "array"
226                                                                                         ],
227                                                                                         "items": {
228                                                                                                 "type": "string"
229                                                                                         }
230                                                                                 }
231                                                                         }
232                                                                 },
233                                                                 "debugScripts": {
234                                                                         "type": ["string", "array"],
235                                                                         "description": "Scripts to include in debug contexts",
236                                                                         "items": {
237                                                                                 "type": "string"
238                                                                         }
239                                                                 },
240                                                                 "loaderScripts": {
241                                                                         "type": ["string", "array"],
242                                                                         "description": "Scripts to include in the startup module",
243                                                                         "items": {
244                                                                                 "type": "string"
245                                                                         }
246                                                                 },
247                                                                 "dependencies": {
248                                                                         "type": ["string", "array"],
249                                                                         "description": "Modules which must be loaded before this module",
250                                                                         "items": {
251                                                                                 "type": "string"
252                                                                         }
253                                                                 },
254                                                                 "styles": {
255                                                                         "type": ["string", "array", "object"],
256                                                                         "description": "Styles to always load",
257                                                                         "items": {
258                                                                                 "type": "string"
259                                                                         }
260                                                                 },
261                                                                 "skinStyles": {
262                                                                         "type": "object",
263                                                                         "description": "Styles to include in specific skin contexts (mapping of skin name to style(s))",
264                                                                         "patternProperties": {
265                                                                                 ".+": {
266                                                                                         "type": [
267                                                                                                 "string",
268                                                                                                 "array"
269                                                                                         ],
270                                                                                         "items": {
271                                                                                                 "type": "string"
272                                                                                         }
273                                                                                 }
274                                                                         }
275                                                                 },
276                                                                 "messages": {
277                                                                         "type": ["string", "array"],
278                                                                         "description": "Messages to always load",
279                                                                         "items": {
280                                                                                 "type": "string"
281                                                                         }
282                                                                 },
283                                                                 "group": {
284                                                                         "type": "string",
285                                                                         "description": "Group with which this module should be loaded"
286                                                                 },
287                                                                 "deprecated": {
288                                                                         "type": ["object", "string", "boolean"],
289                                                                         "description": "Whether the module is deprecated and usage is discouraged. Either a boolean, or a string or an object with key message can be used to customise deprecation message."
290                                                                 },
291                                                                 "position": {
292                                                                         "type": "string",
293                                                                         "description": "Position on the page to load this module at",
294                                                                         "enum": [
295                                                                                 "bottom",
296                                                                                 "top"
297                                                                         ]
298                                                                 },
299                                                                 "templates": {
300                                                                         "type": ["object", "array"],
301                                                                         "description": "Templates to be loaded for client-side usage",
302                                                                         "items": {
303                                                                                 "type": "string"
304                                                                         }
305                                                                 },
306                                                                 "targets": {
307                                                                         "type": ["string", "array"],
308                                                                         "description": "ResourceLoader target the module can run on",
309                                                                         "items": {
310                                                                                 "type": "string"
311                                                                         }
312                                                                 },
313                                                                 "noflip": {
314                                                                         "type": "boolean",
315                                                                         "description": "Whether to skip CSSJanus LTR-to-RTL flipping for this module. Recommended for styles imported from libraries that already properly handle their RTL styles. Default is false, meaning CSSJanus will be applied on RTL-mode output."
316                                                                 },
317                                                                 "packageFiles": {
318                                                                         "type": ["string", "array"],
319                                                                         "description": "Package files that can be require()d",
320                                                                         "items": {
321                                                                                 "type": ["string", "object"]
322                                                                         }
323                                                                 },
324                                                                 "es6": {
325                                                                         "type": "boolean",
326                                                                         "description": "Whether this module requires an ES6-capable browser. If set to true, loading this module in a non-ES6 browser will cause an error. Using ES6 syntax in modules is not yet supported, but will be in the near future. Default is false."
327                                                                 }
328                                                         }
329                                                 },
330                                                 {
331                                                         "description": "A ResourceLoaderWikiModule definition",
332                                                         "additionalProperties": false,
333                                                         "properties": {
334                                                                 "class": {
335                                                                         "enum": ["ResourceLoaderWikiModule"]
336                                                                 },
337                                                                 "group": {
338                                                                         "type": "string",
339                                                                         "description": "Group with which this module should be loaded"
340                                                                 },
341                                                                 "position": {
342                                                                         "type": "string",
343                                                                         "description": "Position on the page to load this module at",
344                                                                         "enum": [
345                                                                                 "bottom",
346                                                                                 "top"
347                                                                         ]
348                                                                 },
349                                                                 "targets": {
350                                                                         "type": ["string", "array"],
351                                                                         "description": "ResourceLoader target the module can run on",
352                                                                         "items": {
353                                                                                 "type": "string"
354                                                                         }
355                                                                 },
356                                                                 "scripts": {
357                                                                         "type": "array",
358                                                                         "description": "A list of on-wiki pages containing JavaScript that should be loaded",
359                                                                         "items": {
360                                                                                 "type": "string"
361                                                                         }
362                                                                 },
363                                                                 "styles": {
364                                                                         "type": "array",
365                                                                         "description": "A list of on-wiki pages containing CSS that should be loaded",
366                                                                         "items": {
367                                                                                 "type": "string"
368                                                                         }
369                                                                 }
370                                                         }
371                                                 },
372                                                 {
373                                                         "description": "A ResourceLoaderImageModule definition",
374                                                         "additionalProperties": false,
375                                                         "properties": {
376                                                                 "class": {
377                                                                         "enum": ["ResourceLoaderImageModule"]
378                                                                 },
379                                                                 "localBasePath": {
380                                                                         "type": "string",
381                                                                         "description": "Base path to prepend to all local paths. Defaults to $IP"
382                                                                 },
383                                                                 "defaultColor": {
384                                                                         "type": "string"
385                                                                 },
386                                                                 "data": {
387                                                                         "type": "string"
388                                                                 },
389                                                                 "prefix": {
390                                                                         "type": "string"
391                                                                 },
392                                                                 "selector": {
393                                                                         "type": "string"
394                                                                 },
395                                                                 "selectorWithoutVariant": {
396                                                                         "type": "string"
397                                                                 },
398                                                                 "selectorWithVariant": {
399                                                                         "type": "string"
400                                                                 },
401                                                                 "useDataURI": {
402                                                                         "type": "boolean"
403                                                                 },
404                                                                 "variants": {
405                                                                         "type": "object"
406                                                                 },
407                                                                 "images": {
408                                                                         "type": "object"
409                                                                 },
410                                                                 "position": {
411                                                                         "enum": [
412                                                                                 "top",
413                                                                                 "bottom"
414                                                                         ]
415                                                                 }
416                                                         }
417                                                 },
418                                                 {
419                                                         "description": "An arbitrary ResourceLoaderModule definition by class",
420                                                         "properties": {
421                                                                 "class": {
422                                                                         "type": "string",
423                                                                         "pattern": "^(?!ResourceLoader(File|Image|Wiki)Module).*$"
424                                                                 }
425                                                         },
426                                                         "required": ["class"]
427                                                 },
428                                                 {
429                                                         "description": "An arbitrary ResourceLoaderModule definition with instantiator",
430                                                         "properties": {
431                                                                 "factory": {
432                                                                         "type": "string",
433                                                                         "description": "A static instantiator function for creating the ResourceLoaderModule object."
434                                                                 }
435                                                         },
436                                                         "required": ["factory"]
437                                                 }
438                                         ]
439                                 }
440                         }
441                 },
442                 "ResourceModuleSkinStyles": {
443                         "type": "object",
444                         "description": "ResourceLoader modules for custom skin styles"
445                 },
446                 "ResourceLoaderSources": {
447                         "type": "object",
448                         "description": "ResourceLoader sources to register"
449                 },
450                 "SkinLessImportPaths": {
451                         "type": "object",
452                         "description": "Path to the skin-specific LESS import directory, keyed by skin name. Can be used to define skin-specific LESS variables."
453                 },
454                 "QUnitTestModule": {
455                         "type": "object",
456                         "description": "A ResourceLoaderFileModule definition registered only when wgEnableJavaScriptTest is true.",
457                         "additionalProperties": false,
458                         "properties": {
459                                 "localBasePath": {
460                                         "type": "string",
461                                         "description": "Prefix for local paths to files in $options, relative to extenion directory"
462                                 },
463                                 "remoteExtPath": {
464                                         "type": "string",
465                                         "description": "Prefix for URLs to files in $options, relative to $wgExtensionAssetsPath"
466                                 },
467                                 "remoteSkinPath": {
468                                         "type": "string",
469                                         "description": "Prefix for URLs to files in $options, relative to $wgStylePath"
470                                 },
471                                 "scripts": {
472                                         "type": ["string", "array"],
473                                         "description": "Scripts to include (array of file paths)",
474                                         "items": {
475                                                 "type": "string"
476                                         }
477                                 },
478                                 "packageFiles": {
479                                         "type": ["string", "array"],
480                                         "description": "Package files that can be require()d",
481                                         "items": {
482                                                 "type": ["string", "object"]
483                                         }
484                                 },
485                                 "dependencies": {
486                                         "type": ["string", "array"],
487                                         "description": "Modules which must be loaded before this module",
488                                         "items": {
489                                                 "type": "string"
490                                         }
491                                 },
492                                 "styles": {
493                                         "type": ["string", "array", "object"],
494                                         "description": "Styles to load",
495                                         "items": {
496                                                 "type": "string"
497                                         }
498                                 },
499                                 "templates": {
500                                         "type": ["object", "array"],
501                                         "description": "Templates to be loaded for client-side usage",
502                                         "items": {
503                                                 "type": "string"
504                                         }
505                                 },
506                                 "messages": {
507                                         "type": ["string", "array"],
508                                         "description": "Messages to load",
509                                         "items": {
510                                                 "type": "string"
511                                         }
512                                 }
513                         }
514                 },
515                 "MessagePosterModule": {
516                         "type": "object",
517                         "description": "Additional JavaScript files and modules that will register content models with mw.messagePoster.factory.",
518                         "additionalProperties": false,
519                         "properties": {
520                                 "localBasePath": {
521                                         "type": "string",
522                                         "description": "Prefix for local paths to files in $options, relative to extenion directory"
523                                 },
524                                 "scripts": {
525                                         "type": "array",
526                                         "description": "Scripts to include as array of file paths",
527                                         "items": {
528                                                 "type": "string"
529                                         }
530                                 },
531                                 "dependencies": {
532                                         "type": "array",
533                                         "description": "Modules which must load before these files",
534                                         "items": {
535                                                 "type": "string"
536                                         }
537                                 }
538                         }
539                 },
540                 "ConfigRegistry": {
541                         "type": "object",
542                         "description": "Registry of factory functions to create Config objects"
543                 },
544                 "SessionProviders": {
545                         "type": "object",
546                         "description": "Session providers"
547                 },
548                 "AuthManagerAutoConfig": {
549                         "type": "object",
550                         "description": "AuthManager auto-configuration",
551                         "additionalProperties": false,
552                         "properties": {
553                                 "preauth": {
554                                         "type": "object",
555                                         "description": "Pre-authentication providers"
556                                 },
557                                 "primaryauth": {
558                                         "type": "object",
559                                         "description": "Primary authentication providers"
560                                 },
561                                 "secondaryauth": {
562                                         "type": "object",
563                                         "description": "Secondary authentication providers"
564                                 }
565                         }
566                 },
567                 "CentralIdLookupProviders": {
568                         "type": "object",
569                         "description": "Central ID lookup providers"
570                 },
571                 "ChangeCredentialsBlacklist": {
572                         "type": "object",
573                         "description": "AuthenticationRequest classes which can only be used internally for credentials change"
574                 },
575                 "RemoveCredentialsBlacklist": {
576                         "type": "object",
577                         "description": "AuthenticationRequest classes which can only be used internally for credentials removal"
578                 },
579                 "namespaces": {
580                         "type": "array",
581                         "description": "Method to add extra namespaces",
582                         "items": {
583                                 "type": "object",
584                                 "properties": {
585                                         "id": {
586                                                 "type": "integer"
587                                         },
588                                         "constant": {
589                                                 "type": "string"
590                                         },
591                                         "name": {
592                                                 "type": "string"
593                                         },
594                                         "gender": {
595                                                 "type": "object",
596                                                 "properties": {
597                                                         "male": {
598                                                                 "type": "string"
599                                                         },
600                                                         "female": {
601                                                                 "type": "string"
602                                                         }
603                                                 }
604                                         },
605                                         "subpages": {
606                                                 "type": "boolean",
607                                                 "default": false
608                                         },
609                                         "content": {
610                                                 "type": "boolean",
611                                                 "default": false
612                                         },
613                                         "defaultcontentmodel": {
614                                                 "type": "string"
615                                         },
616                                         "protection": {
617                                                 "type": ["string", "array"],
618                                                 "description": "Userright(s) required to edit in this namespace"
619                                         },
620                                         "capitallinkoverride": {
621                                                 "type": "boolean",
622                                                 "description": "Set $wgCapitalLinks on a per-namespace basis"
623                                         },
624                                         "conditional": {
625                                                 "type": "boolean",
626                                                 "description": "Whether the namespace is conditional upon configuration and should not be registered (requires separate registration via a hook)",
627                                                 "default": false
628                                         },
629                                         "movable": {
630                                                 "type": "boolean",
631                                                 "description": "Whether it is possible to move pages in this namespace",
632                                                 "default": true
633                                         }
634                                 },
635                                 "required": ["id", "constant", "name"]
636                         }
637                 },
638                 "TrackingCategories": {
639                         "type": "array",
640                         "description": "Tracking category message keys",
641                         "items": {
642                                 "type": "string"
643                         }
644                 },
645                 "DefaultUserOptions": {
646                         "type": "object",
647                         "description": "Default values of user options"
648                 },
649                 "HiddenPrefs": {
650                         "type": "array",
651                         "description": "Preferences users cannot set",
652                         "items": {
653                                 "type": "string"
654                         }
655                 },
656                 "GroupPermissions": {
657                         "type": "object",
658                         "description": "Default permissions to give to user groups",
659                         "patternProperties": {
660                                 "^[a-z]+$": {
661                                         "type": "object",
662                                         "patternProperties": {
663                                                 "^[a-z]+$": {
664                                                         "type": "boolean"
665                                                 }
666                                         }
667                                 }
668                         }
669                 },
670                 "RevokePermissions": {
671                         "type": "object",
672                         "description": "Default permissions to revoke from user groups",
673                         "patternProperties": {
674                                 "^[a-z]+$": {
675                                         "type": "object",
676                                         "patternProperties": {
677                                                 "^[a-z]+$": {
678                                                         "type": "boolean"
679                                                 }
680                                         }
681                                 }
682                         }
683                 },
684                 "GrantPermissions": {
685                         "type": "object",
686                         "description": "Map of permissions granted to authorized consumers to their bundles, called 'grants'",
687                         "patternProperties": {
688                                 "^[a-z]+$": {
689                                         "type": "object",
690                                         "patternProperties": {
691                                                 "^[a-z]+$": {
692                                                         "type": "boolean"
693                                                 }
694                                         }
695                                 }
696                         }
697                 },
698                 "GrantPermissionGroups": {
699                         "type": "object",
700                         "description": "Map of grants to their UI grouping",
701                         "patternProperties": {
702                                 "^[a-z]+$": {
703                                         "type": "string"
704                                 }
705                         }
706                 },
707                 "ImplicitGroups": {
708                         "type": "array",
709                         "description": "Implicit groups"
710                 },
711                 "GroupsAddToSelf": {
712                         "type": "object",
713                         "description": "Groups a user can add to themselves"
714                 },
715                 "GroupsRemoveFromSelf": {
716                         "type": "object",
717                         "description": "Groups a user can remove from themselves"
718                 },
719                 "AddGroups": {
720                         "type": "object",
721                         "description": "Groups a user can add to users"
722                 },
723                 "RemoveGroups": {
724                         "type": "object",
725                         "description": "Groups a user can remove from users"
726                 },
727                 "AvailableRights": {
728                         "type": "array",
729                         "description": "User rights added by the extension",
730                         "items": {
731                                 "type": "string"
732                         }
733                 },
734                 "ContentHandlers": {
735                         "type": "object",
736                         "description": "Mapping of model ID to class name",
737                         "patternProperties": {
738                                 "^[A-Za-z]+$": {
739                                         "type": "string"
740                                 }
741                         }
742                 },
743                 "RateLimits": {
744                         "type": "object",
745                         "description": "Rate limits"
746                 },
747                 "RecentChangesFlags": {
748                         "type": "object",
749                         "description": "Flags (letter symbols) shown on RecentChanges pages"
750                 },
751                 "MediaHandlers": {
752                         "type": "object",
753                         "description": "Plugins for media file type handling. Each entry in the array maps a MIME type to a PHP class name."
754                 },
755                 "ExtensionFunctions": {
756                         "type": [
757                                 "array",
758                                 "string"
759                         ],
760                         "description": "Function to call after setup has finished",
761                         "items": {
762                                 "type": "string"
763                         }
764                 },
765                 "ExtensionMessagesFiles": {
766                         "type": "object",
767                         "description": "File paths containing PHP internationalization data"
768                 },
769                 "MessagesDirs": {
770                         "type": "object",
771                         "description": "Directory paths containing JSON internationalization data"
772                 },
773                 "ExtensionEntryPointListFiles": {
774                         "type": "object"
775                 },
776                 "SpecialPages": {
777                         "type": "object",
778                         "description": "SpecialPages implemented in this extension (mapping of page name to class name or to ObjectFactory spec)"
779                 },
780                 "AutoloadNamespaces": {
781                         "type": "object",
782                         "description": "Mapping of PSR-4 compliant namespace to directory for autoloading",
783                         "patternProperties": {
784                                 "^[A-Za-z0-9\\\\]+\\\\$": {
785                                         "type": "string"
786                                 }
787                         },
788                         "additionalProperties": false
789                 },
790                 "AutoloadClasses": {
791                         "type": "object"
792                 },
793                 "TestAutoloadNamespaces": {
794                         "type": "object",
795                         "description": "Mapping of PSR-4 compliant namespace to directory for autoloading to be used in tests",
796                         "patternProperties": {
797                                 "^[A-Za-z0-9\\\\]+\\\\$": {
798                                         "type": "string"
799                                 }
800                         },
801                         "additionalProperties": false
802                 },
803                 "TestAutoloadClasses": {
804                         "type": "object"
805                 },
806                 "Hooks": {
807                         "type": "object",
808                         "description": "Hooks this extension uses (mapping of hook name to callback)",
809                         "additionalProperties": {
810                                 "oneOf": [
811                                         {
812                                                 "type": "string",
813                                                 "description": "A global function name, static function name, or the name of a property in HookHandlers"
814                                         },
815                                         {
816                                                 "type": "object",
817                                                 "description": "A handler specification",
818                                                 "properties": {
819                                                         "handler": {
820                                                                 "type": "string",
821                                                                 "description": "The name of a property in HookHandlers"
822                                                         },
823                                                         "deprecated": {
824                                                                 "type": "boolean",
825                                                                 "description": "The deprecation acknowledgement flag for the handler. If this is true, calls will be filtered if the relevant hook is deprecated."
826                                                         }
827                                                 },
828                                                 "required": [
829                                                         "handler"
830                                                 ]
831                                         },
832                                         {
833                                                 "type": "array",
834                                                 "description": "An ordered array of handlers",
835                                                 "items": {
836                                                         "oneOf": [
837                                                                 {
838                                                                         "type": "string",
839                                                                         "description": "A global function name, static function name, or the name of a property in HookHandlers"
840                                                                 },
841                                                                 {
842                                                                         "type": "object",
843                                                                         "description": "A handler specification",
844                                                                         "properties": {
845                                                                                 "handler": {
846                                                                                         "type": "string",
847                                                                                         "description": "The name of a property in HookHandlers"
848                                                                                 },
849                                                                                 "deprecated": {
850                                                                                         "type": "boolean",
851                                                                                         "description": "The deprecation acknowledgement flag for the handler. If this is true, calls will be filtered if the relevant hook is deprecated."
852                                                                                 }
853                                                                         },
854                                                                         "required": [
855                                                                                 "handler"
856                                                                         ]
857                                                                 }
858                                                         ]
859                                                 }
860                                         }
861                                 ]
862                         }
863                 },
864                 "HookHandlers": {
865                         "type": "object",
866                         "description": "ObjectFactory specifications for new-style hook handlers",
867                         "additionalProperties": {
868                                 "type": "object",
869                                 "properties": {
870                                         "factory": {
871                                                 "type": ["string", "array"],
872                                                 "description": "A factory function to be called to create the handler for this hook"
873                                         },
874                                         "class": {
875                                                 "type": "string",
876                                                 "description": "The fully-qualified class name of the handler. This should be omitted if a factory is specified."
877                                         },
878                                         "args": {
879                                                 "type": "array",
880                                                 "description": "The arguments passed to the handler constructor or factory"
881                                         },
882                                         "services": {
883                                                 "type": "array",
884                                                 "description": "If supplied and non-empty, the named services are requested from the service container and prepended before 'args'."
885                                         },
886                                         "optional_services": {
887                                                 "type": "array",
888                                                 "description": "If supplied and non-empty, the named services are requested from the service container and appended after 'services' if the services are available; null is passed if the services are not available."
889                                         }
890                                 }
891                         }
892                 },
893                 "DeprecatedHooks": {
894                         "type": "object",
895                         "description": "Hooks which are defined and deprecated by the extension",
896                         "additionalProperties": {
897                                 "type": "object",
898                                 "properties": {
899                                         "deprecatedVersion": {
900                                                 "type": "string",
901                                                 "description": "The version in which the hook was deprecated"
902                                         },
903                                         "component": {
904                                                 "type": "string",
905                                                 "description" : "The component to which the deprecated version relates. If omitted, the extension name will be used."
906                                         },
907                                         "silent": {
908                                                 "type": "boolean",
909                                                 "description": "If true, no warning is raised when the hook is called or when a handler is declared. However, call filtering is still activated."
910                                         }
911                                 },
912                                 "required": [
913                                         "deprecatedVersion"
914                                 ]
915                         }
916                 },
917                 "JobClasses": {
918                         "type": "object",
919                         "description": "Job types this extension implements (mapping of job type to class name or factory function)"
920                 },
921                 "LogTypes": {
922                         "type": "array",
923                         "description": "List of new log types this extension uses"
924                 },
925                 "LogRestrictions": {
926                         "type": "object"
927                 },
928                 "FilterLogTypes": {
929                         "type": "object"
930                 },
931                 "ActionFilteredLogs": {
932                         "type": "object",
933                         "description": "List of log types which can be filtered by log actions",
934                         "patternProperties": {
935                                 "^[a-z-]+$": {
936                                         "type": "object",
937                                         "patternProperties": {
938                                                 "^[a-z-]+$": {
939                                                         "type": "array",
940                                                         "items": {
941                                                                 "type": "string"
942                                                         }
943                                                 }
944                                         }
945                                 }
946                         }
947                 },
948                 "LogNames": {
949                         "type": "object"
950                 },
951                 "LogHeaders": {
952                         "type": "object"
953                 },
954                 "LogActions": {
955                         "type": "object"
956                 },
957                 "LogActionsHandlers": {
958                         "type": "object"
959                 },
960                 "Actions": {
961                         "type": "object"
962                 },
963                 "APIModules": {
964                         "type": "object"
965                 },
966                 "APIFormatModules": {
967                         "type": "object"
968                 },
969                 "APIMetaModules": {
970                         "type": "object"
971                 },
972                 "APIPropModules": {
973                         "type": "object"
974                 },
975                 "APIListModules": {
976                         "type": "object"
977                 },
978                 "ValidSkinNames": {
979                         "type": "object",
980                         "description":  "Mapping of skin canonical names to PHP class name using the Object Factory specification. Or historically, the human readable name of the skin."
981                 },
982                 "FeedClasses": {
983                         "type": "object",
984                         "description": "Available feeds objects"
985                 },
986                 "SkinOOUIThemes": {
987                         "type": "object",
988                         "description": "Map of skin names to OOUI themes to use. Same format as ResourceLoaderOOUIModule::$builtinSkinThemeMap."
989                 },
990                 "OOUIThemePaths": {
991                         "type": "object",
992                         "description": "Map of custom OOUI theme names to paths to load them from. Same format as ResourceLoaderOOUIModule::$builtinThemePaths.",
993                         "patternProperties": {
994                                 "^[A-Za-z]+$": {
995                                         "type": "object",
996                                         "additionalProperties": false,
997                                         "properties": {
998                                                 "localBasePath": {
999                                                         "type": "string",
1000                                                         "description": "Base path to prepend to all local paths, relative to current directory"
1001                                                 },
1002                                                 "remoteExtPath": {
1003                                                         "type": "string",
1004                                                         "description": "Base path to prepend to all remote paths, relative to $wgExtensionAssetsPath"
1005                                                 },
1006                                                 "remoteSkinPath": {
1007                                                         "type": "string",
1008                                                         "description": "Base path to prepend to all remote paths, relative to $wgStylePath"
1009                                                 },
1010                                                 "scripts": {
1011                                                         "type": "string",
1012                                                         "description": "Path to script file."
1013                                                 },
1014                                                 "styles": {
1015                                                         "type": "string",
1016                                                         "description": "Path to style files. '{module}' will be replaced with the module's name."
1017                                                 },
1018                                                 "images": {
1019                                                         "type": [ "string", "null" ],
1020                                                         "description": "Path to images (optional). '{module}' will be replaced with the module's name."
1021                                                 }
1022                                         }
1023                                 }
1024                         }
1025                 },
1026                 "PasswordPolicy": {
1027                         "type": "object",
1028                         "description": "Password policies"
1029                 },
1030                 "FileExtensions": {
1031                         "type": "array",
1032                         "description": "Preferred file extensions for uploading",
1033                         "items": {
1034                                 "type": "string"
1035                         }
1036                 },
1037                 "RawHtmlMessages": {
1038                         "type": "array",
1039                         "description": "Messages which are rendered as raw HTML",
1040                         "items": {
1041                                 "type": "string"
1042                         }
1043                 },
1044                 "ReauthenticateTime": {
1045                         "type": "object",
1046                         "patternProperties": {
1047                                 ".*": {
1048                                         "type": "integer"
1049                                 }
1050                         }
1051                 },
1052                 "callback": {
1053                         "type": [
1054                                 "array",
1055                                 "string"
1056                         ],
1057                         "description": "A function to be called right after MediaWiki processes this file"
1058                 },
1059                 "config_prefix": {
1060                         "type": "string",
1061                         "default": "wg",
1062                         "description": "Prefix to put in front of configuration settings when exporting them to $GLOBALS"
1063                 },
1064                 "config": {
1065                         "type": "object",
1066                         "description": "Configuration options for this extension",
1067                         "patternProperties": {
1068                                 "^[a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*$": {
1069                                         "type": "object",
1070                                         "additionalProperties": false,
1071                                         "properties": {
1072                                                 "value": {
1073                                                         "required": true
1074                                                 },
1075                                                 "merge_strategy": {
1076                                                         "type": "string",
1077                                                         "enum": [
1078                                                                 "array_merge_recursive",
1079                                                                 "array_replace_recursive",
1080                                                                 "array_plus_2d",
1081                                                                 "array_plus",
1082                                                                 "array_merge",
1083                                                                 "provide_default"
1084                                                         ],
1085                                                         "default": "array_merge"
1086                                                 },
1087                                                 "path": {
1088                                                         "description": "Whether this should be interpreted as a filesystem path, relative to extension directory root",
1089                                                         "type": "boolean",
1090                                                         "default": false
1091                                                 },
1092                                                 "description": {
1093                                                         "type": ["string", "array"],
1094                                                         "description": "A description of the config setting, mostly for documentation/developers"
1095                                                 },
1096                                                 "descriptionmsg": {
1097                                                         "type": "string",
1098                                                         "description": "The message key which should be used as a description for this configuration option in a user interface. If empty, description will be used."
1099                                                 },
1100                                                 "public": {
1101                                                         "type": "boolean",
1102                                                         "default": false,
1103                                                         "description": "Whether this configuration option and its value is allowed to be revealed in public or not."
1104                                                 }
1105                                         }
1106                                 }
1107                         }
1108                 },
1109                 "ParserTestFiles": {
1110                         "type": "array",
1111                         "description": "DEPRECATED: Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
1112                 },
1113                 "SearchMappings": {
1114                         "type": "object",
1115                         "description": "Mapping of search canonical names (used in $wgSearchType and $wgSearchTypeAlternatives) using the Object Factory specification"
1116                 },
1117                 "ServiceWiringFiles": {
1118                         "type": "array",
1119                         "description": "List of service wiring files to be loaded by the default instance of MediaWikiServices"
1120                 },
1121                 "RestRoutes": {
1122                         "type": "array",
1123                         "description": "List of route specifications to be added to the REST API",
1124                         "items": {
1125                                 "type": "object",
1126                                 "properties": {
1127                                         "method": {
1128                                                 "oneOf": [
1129                                                         {
1130                                                                 "type": "string",
1131                                                                 "description": "The HTTP method name"
1132                                                         },
1133                                                         {
1134                                                                 "type": "array",
1135                                                                 "items": {
1136                                                                         "type": "string",
1137                                                                         "description": "An acceptable HTTP method name"
1138                                                                 }
1139                                                         }
1140                                                 ]
1141                                         },
1142                                         "path": {
1143                                                 "type": "string",
1144                                                 "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}."
1145                                         },
1146                                         "factory": {
1147                                                 "type": ["string", "array"],
1148                                                 "description": "A factory function to be called to create the handler for this route"
1149                                         },
1150                                         "class": {
1151                                                 "type": "string",
1152                                                 "description": "The fully-qualified class name of the handler. This should be omitted if a factory is specified."
1153                                         },
1154                                         "args": {
1155                                                 "type": "array",
1156                                                 "description": "The arguments passed to the handler constructor or factory"
1157                                         },
1158                                         "services": {
1159                                                 "type": "array",
1160                                                 "description": "If supplied and non-empty, the named services are requested from the service container and prepended before 'args'."
1161                                         }
1162                                 }
1163                         }
1164                 },
1165                 "ParsoidModules": {
1166                         "type": "array",
1167                         "description": "List of extension modules to be registered with the Parsoid wikitext parser",
1168                         "items": {
1169                                 "oneOf": [
1170                                         {
1171                                                 "type": "string",
1172                                                 "description": "The fully-qualified name of a class implementing Wikimedia\\Parsoid\\Ext\\ExtensionModule"
1173                                         },
1174                                         {
1175                                                 "type": "object",
1176                                                 "description": "An object factory specification for a class implementing Wikimedia\\Parsoid\\Ext\\ExtensionModule",
1177                                                 "properties": {
1178                                                         "factory": {
1179                                                                 "type": ["string", "array"],
1180                                                                 "description": "A factory function to be called to create an ExtensionModule. This should be omitted if a class is specified."
1181                                                         },
1182                                                         "class": {
1183                                                                 "type": "string",
1184                                                                 "description": "The fully-qualified class name of a class implemeting Wikimedia\\Parsoid\\Ext\\ExtensionModule. This should be omitted if a factory is specified."
1185                                                         },
1186                                                         "args": {
1187                                                                 "type": "array",
1188                                                                 "description": "The arguments passed to the ExtensionModule constructor or factory"
1189                                                         }
1190                                                 }
1191                                         },
1192                                         {
1193                                                 "type": "object",
1194                                                 "description": "A Parsoid extension module configuration array",
1195                                                 "properties": {
1196                                                         "domProcessors": {
1197                                                                 "type": "array",
1198                                                                 "items": {
1199                                                                         "description": "Object factory specification of a class implementing Wikimedia\\Parsoid\\Ext\\DOMProcessor"
1200                                                                 }
1201                                                         },
1202                                                         "styles": {
1203                                                                 "type": "array",
1204                                                                 "items": {
1205                                                                         "type": "string",
1206                                                                         "description": "Additional ResourceLoader styles to include"
1207                                                                 }
1208                                                         },
1209                                                         "tags": {
1210                                                                 "type": "array",
1211                                                                 "items": {
1212                                                                         "type": "object",
1213                                                                         "description": "An extension tag",
1214                                                                         "properties": {
1215                                                                                 "name": {
1216                                                                                         "type": "string",
1217                                                                                         "description": "The name of the extension tag",
1218                                                                                         "required": true
1219                                                                                 },
1220                                                                                 "handler": {
1221                                                                                         "description": "An object factory specification of a class extending Wikimedia\\Parsoid\\Ext\\ExtensionTagHandler"
1222                                                                                 },
1223                                                                                 "options": {
1224                                                                                         "type": "object",
1225                                                                                         "description": "Additional Parsoid processing configuration for this extension tag"
1226                                                                                 }
1227                                                                         }
1228                                                                 }
1229                                                         }
1230                                                 }
1231                                         }
1232                                 ]
1233                         }
1234                 },
1235                 "attributes": {
1236                         "description":"Registration information for other extensions",
1237                         "type": "object",
1238                         "patternProperties": {
1239                                 ".*": {
1240                                         "type": "object",
1241                                         "patternProperties": {
1242                                                 ".*": {
1243                                                         "type": ["array", "object"]
1244                                                 }
1245                                         }
1246                                 }
1247                         }
1248                 },
1249                 "load_composer_autoloader": {
1250                         "type": "boolean",
1251                         "description": "Load the composer autoloader for this extension, if one is present"
1252                 }
1253         }