objectcache: Document the primary entry points people should use
[mediawiki.git] / docs / extension.schema.json
blob1d78eccfc907ad4e6e1f7becc82d3070fc5e1a93
2         "$schema": "http://json-schema.org/schema#",
3         "description": "MediaWiki extension.json schema",
4         "type": "object",
5         "properties": {
6                 "manifest_version": {
7                         "type": "integer",
8                         "description": "Version of the extension.json schema the extension.json file is in.",
9                         "required": true
10                 },
11                 "name": {
12                         "type": "string",
13                         "description": "The extension's canonical name.",
14                         "required": true
15                 },
16                 "namemsg": {
17                         "type": "string",
18                         "description": "i18n message key of the extension's name."
19                 },
20                 "type": {
21                         "type": "string",
22                         "description": "The extension's type, as an index to $wgExtensionCredits.",
23                         "default": "other"
24                 },
25                 "author": {
26                         "type": [
27                                 "string",
28                                 "array"
29                         ],
30                         "description": "Extension's authors.",
31                         "items": {
32                                 "type": "string"
33                         }
34                 },
35                 "version": {
36                         "type": "string",
37                         "description": "The version of this release of the extension."
38                 },
39                 "url": {
40                         "type": "string",
41                         "description": "URL to the homepage for the extension.",
42                         "format": "uri"
43                 },
44                 "description": {
45                         "type": "string",
46                         "description": "Raw description of the extension."
47                 },
48                 "descriptionmsg": {
49                         "type": "string",
50                         "description": "Message key for a i18n message describing the extension."
51                 },
52                 "license-name": {
53                         "type": "string",
54                         "description": "Short identifier for the license under which the extension is released.",
55                         "enum": [
56                                 "AFL-1.1",
57                                 "AFL-1.2",
58                                 "AFL-2.0",
59                                 "AFL-2.1",
60                                 "AFL-3.0",
61                                 "APL-1.0",
62                                 "Aladdin",
63                                 "ANTLR-PD",
64                                 "Apache-1.0",
65                                 "Apache-1.1",
66                                 "Apache-2.0",
67                                 "APSL-1.0",
68                                 "APSL-1.1",
69                                 "APSL-1.2",
70                                 "APSL-2.0",
71                                 "Artistic-1.0",
72                                 "Artistic-1.0-cl8",
73                                 "Artistic-1.0-Perl",
74                                 "Artistic-2.0",
75                                 "AAL",
76                                 "BitTorrent-1.0",
77                                 "BitTorrent-1.1",
78                                 "BSL-1.0",
79                                 "BSD-2-Clause",
80                                 "BSD-2-Clause-FreeBSD",
81                                 "BSD-2-Clause-NetBSD",
82                                 "BSD-3-Clause",
83                                 "BSD-3-Clause-Clear",
84                                 "BSD-4-Clause",
85                                 "BSD-4-Clause-UC",
86                                 "CECILL-1.0",
87                                 "CECILL-1.1",
88                                 "CECILL-2.0",
89                                 "CECILL-B",
90                                 "CECILL-C",
91                                 "ClArtistic",
92                                 "CNRI-Python",
93                                 "CNRI-Python-GPL-Compatible",
94                                 "CPOL-1.02",
95                                 "CDDL-1.0",
96                                 "CDDL-1.1",
97                                 "CPAL-1.0",
98                                 "CPL-1.0",
99                                 "CATOSL-1.1",
100                                 "Condor-1.1",
101                                 "CC-BY-1.0",
102                                 "CC-BY-2.0",
103                                 "CC-BY-2.5",
104                                 "CC-BY-3.0",
105                                 "CC-BY-ND-1.0",
106                                 "CC-BY-ND-2.0",
107                                 "CC-BY-ND-2.5",
108                                 "CC-BY-ND-3.0",
109                                 "CC-BY-NC-1.0",
110                                 "CC-BY-NC-2.0",
111                                 "CC-BY-NC-2.5",
112                                 "CC-BY-NC-3.0",
113                                 "CC-BY-NC-ND-1.0",
114                                 "CC-BY-NC-ND-2.0",
115                                 "CC-BY-NC-ND-2.5",
116                                 "CC-BY-NC-ND-3.0",
117                                 "CC-BY-NC-SA-1.0",
118                                 "CC-BY-NC-SA-2.0",
119                                 "CC-BY-NC-SA-2.5",
120                                 "CC-BY-NC-SA-3.0",
121                                 "CC-BY-SA-1.0",
122                                 "CC-BY-SA-2.0",
123                                 "CC-BY-SA-2.5",
124                                 "CC-BY-SA-3.0",
125                                 "CC0-1.0",
126                                 "CUA-OPL-1.0",
127                                 "D-FSL-1.0",
128                                 "WTFPL",
129                                 "EPL-1.0",
130                                 "eCos-2.0",
131                                 "ECL-1.0",
132                                 "ECL-2.0",
133                                 "EFL-1.0",
134                                 "EFL-2.0",
135                                 "Entessa",
136                                 "ErlPL-1.1",
137                                 "EUDatagrid",
138                                 "EUPL-1.0",
139                                 "EUPL-1.1",
140                                 "Fair",
141                                 "Frameworx-1.0",
142                                 "FTL",
143                                 "AGPL-1.0",
144                                 "AGPL-3.0",
145                                 "GFDL-1.1",
146                                 "GFDL-1.2",
147                                 "GFDL-1.3",
148                                 "GPL-1.0",
149                                 "GPL-1.0+",
150                                 "GPL-2.0",
151                                 "GPL-2.0+",
152                                 "GPL-2.0-with-autoconf-exception",
153                                 "GPL-2.0-with-bison-exception",
154                                 "GPL-2.0-with-classpath-exception",
155                                 "GPL-2.0-with-font-exception",
156                                 "GPL-2.0-with-GCC-exception",
157                                 "GPL-3.0",
158                                 "GPL-3.0+",
159                                 "GPL-3.0-with-autoconf-exception",
160                                 "GPL-3.0-with-GCC-exception",
161                                 "LGPL-2.1",
162                                 "LGPL-2.1+",
163                                 "LGPL-3.0",
164                                 "LGPL-3.0+",
165                                 "LGPL-2.0",
166                                 "LGPL-2.0+",
167                                 "gSOAP-1.3b",
168                                 "HPND",
169                                 "IBM-pibs",
170                                 "IPL-1.0",
171                                 "Imlib2",
172                                 "IJG",
173                                 "Intel",
174                                 "IPA",
175                                 "ISC",
176                                 "JSON",
177                                 "LPPL-1.3a",
178                                 "LPPL-1.0",
179                                 "LPPL-1.1",
180                                 "LPPL-1.2",
181                                 "LPPL-1.3c",
182                                 "Libpng",
183                                 "LPL-1.02",
184                                 "LPL-1.0",
185                                 "MS-PL",
186                                 "MS-RL",
187                                 "MirOS",
188                                 "MIT",
189                                 "Motosoto",
190                                 "MPL-1.0",
191                                 "MPL-1.1",
192                                 "MPL-2.0",
193                                 "MPL-2.0-no-copyleft-exception",
194                                 "Multics",
195                                 "NASA-1.3",
196                                 "Naumen",
197                                 "NBPL-1.0",
198                                 "NGPL",
199                                 "NOSL",
200                                 "NPL-1.0",
201                                 "NPL-1.1",
202                                 "Nokia",
203                                 "NPOSL-3.0",
204                                 "NTP",
205                                 "OCLC-2.0",
206                                 "ODbL-1.0",
207                                 "PDDL-1.0",
208                                 "OGTSL",
209                                 "OLDAP-2.2.2",
210                                 "OLDAP-1.1",
211                                 "OLDAP-1.2",
212                                 "OLDAP-1.3",
213                                 "OLDAP-1.4",
214                                 "OLDAP-2.0",
215                                 "OLDAP-2.0.1",
216                                 "OLDAP-2.1",
217                                 "OLDAP-2.2",
218                                 "OLDAP-2.2.1",
219                                 "OLDAP-2.3",
220                                 "OLDAP-2.4",
221                                 "OLDAP-2.5",
222                                 "OLDAP-2.6",
223                                 "OLDAP-2.7",
224                                 "OPL-1.0",
225                                 "OSL-1.0",
226                                 "OSL-2.0",
227                                 "OSL-2.1",
228                                 "OSL-3.0",
229                                 "OLDAP-2.8",
230                                 "OpenSSL",
231                                 "PHP-3.0",
232                                 "PHP-3.01",
233                                 "PostgreSQL",
234                                 "Python-2.0",
235                                 "QPL-1.0",
236                                 "RPSL-1.0",
237                                 "RPL-1.1",
238                                 "RPL-1.5",
239                                 "RHeCos-1.1",
240                                 "RSCPL",
241                                 "Ruby",
242                                 "SAX-PD",
243                                 "SGI-B-1.0",
244                                 "SGI-B-1.1",
245                                 "SGI-B-2.0",
246                                 "OFL-1.0",
247                                 "OFL-1.1",
248                                 "SimPL-2.0",
249                                 "Sleepycat",
250                                 "SMLNJ",
251                                 "SugarCRM-1.1.3",
252                                 "SISSL",
253                                 "SISSL-1.2",
254                                 "SPL-1.0",
255                                 "Watcom-1.0",
256                                 "NCSA",
257                                 "VSL-1.0",
258                                 "W3C",
259                                 "WXwindows",
260                                 "Xnet",
261                                 "X11",
262                                 "XFree86-1.1",
263                                 "YPL-1.0",
264                                 "YPL-1.1",
265                                 "Zimbra-1.3",
266                                 "Zlib",
267                                 "ZPL-1.1",
268                                 "ZPL-2.0",
269                                 "ZPL-2.1",
270                                 "Unlicense"
271                         ]
272                 },
273                 "ResourceFileModulePaths": {
274                         "type": "object",
275                         "description": "Default paths to use for all ResourceLoader file modules",
276                         "additionalProperties": false,
277                         "properties": {
278                                 "localBasePath": {
279                                         "type": "string",
280                                         "description": "Base path to prepend to all local paths, relative to current directory"
281                                 },
282                                 "remoteExtPath": {
283                                         "type": "string",
284                                         "description": "Base path to prepend to all remote paths, relative to $wgExtensionAssetsPath"
285                                 },
286                                 "remoteSkinPath": {
287                                         "type": "string",
288                                         "description": "Base path to prepend to all remote paths, relative to $wgStylePath"
289                                 }
290                         }
291                 },
292                 "ResourceModules": {
293                         "type": "object",
294                         "description": "ResourceLoader modules to register",
295                         "additionalProperties": false,
296                         "patternProperties": {
297                                 "^[a-zA-Z0-9-\\.]+$": {
298                                         "type": "object",
299                                         "description": "A single ResourceLoader module descriptor",
300                                         "properties": {
301                                                 "localBasePath": {
302                                                         "type": "string",
303                                                         "description": "Base path to prepend to all local paths in $options. Defaults to $IP"
304                                                 },
305                                                 "remoteBasePath": {
306                                                         "type": "string",
307                                                         "description": "Base path to prepend to all remote paths in $options. Defaults to $wgScriptPath"
308                                                 },
309                                                 "remoteExtPath": {
310                                                         "type": "string",
311                                                         "description": "Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath"
312                                                 },
313                                                 "scripts": {
314                                                         "type": ["string", "array"],
315                                                         "description": "Scripts to always include (array of file paths)",
316                                                         "items": {
317                                                                 "type": "string"
318                                                         }
319                                                 },
320                                                 "languageScripts": {
321                                                         "type": "object",
322                                                         "description": "Scripts to include in specific language contexts (mapping of language code to file path(s))",
323                                                         "patternProperties": {
324                                                                 "^[a-zA-Z0-9-]{2,}$": {
325                                                                         "type": [
326                                                                                 "string",
327                                                                                 "array"
328                                                                         ],
329                                                                         "items": {
330                                                                                 "type": "string"
331                                                                         }
332                                                                 }
333                                                         }
334                                                 },
335                                                 "skinScripts": {
336                                                         "type": "object",
337                                                         "description": "Scripts to include in specific skin contexts (mapping of skin name to script(s)",
338                                                         "patternProperties": {
339                                                                 ".+": {
340                                                                         "type": [
341                                                                                 "string",
342                                                                                 "array"
343                                                                         ],
344                                                                         "items": {
345                                                                                 "type": "string"
346                                                                         }
347                                                                 }
348                                                         }
349                                                 },
350                                                 "debugScripts": {
351                                                         "type": ["string", "array"],
352                                                         "description": "Scripts to include in debug contexts",
353                                                         "items": {
354                                                                 "type": "string"
355                                                         }
356                                                 },
357                                                 "loaderScripts": {
358                                                         "type": ["string", "array"],
359                                                         "description": "Scripts to include in the startup module",
360                                                         "items": {
361                                                                 "type": "string"
362                                                         }
363                                                 },
364                                                 "dependencies": {
365                                                         "type": ["string", "array"],
366                                                         "description": "Modules which must be loaded before this module",
367                                                         "items": {
368                                                                 "type": "string"
369                                                         }
370                                                 },
371                                                 "styles": {
372                                                         "type": ["string", "array", "object"],
373                                                         "description": "Styles to always load",
374                                                         "items": {
375                                                                 "type": "string"
376                                                         }
377                                                 },
378                                                 "skinStyles": {
379                                                         "type": "object",
380                                                         "description": "Styles to include in specific skin contexts (mapping of skin name to style(s))",
381                                                         "patternProperties": {
382                                                                 ".+": {
383                                                                         "type": [
384                                                                                 "string",
385                                                                                 "array"
386                                                                         ],
387                                                                         "items": {
388                                                                                 "type": "string"
389                                                                         }
390                                                                 }
391                                                         }
392                                                 },
393                                                 "messages": {
394                                                         "type": ["string", "array"],
395                                                         "description": "Messages to always load",
396                                                         "items": {
397                                                                 "type": "string"
398                                                         }
399                                                 },
400                                                 "group": {
401                                                         "type": "string",
402                                                         "description": "Group which this module should be loaded together with"
403                                                 },
404                                                 "position": {
405                                                         "type": "string",
406                                                         "description": "Position on the page to load this module at",
407                                                         "enum": [
408                                                                 "bottom",
409                                                                 "top"
410                                                         ]
411                                                 },
412                                                 "templates": {
413                                                         "type": "object",
414                                                         "description": "Templates to be loaded for client-side usage"
415                                                 }
416                                         }
417                                 }
418                         }
419                 },
420                 "ResourceModuleSkinStyles": {
421                         "type": "object",
422                         "description": "ResourceLoader modules for custom skin styles"
423                 },
424                 "ResourceLoaderSources": {
425                         "type": "object",
426                         "description": "ResourceLoader sources to register"
427                 },
428                 "ResourceLoaderLESSVars": {
429                         "type": "object",
430                         "description": "ResourceLoader LESS variables"
431                 },
432                 "ResourceLoaderLESSFunctions": {
433                         "type": "object",
434                         "description": "ResourceLoader LESS functions"
435                 },
436                 "ResourceLoaderLESSImportPaths": {
437                         "type": "object",
438                         "description": "ResourceLoader import paths"
439                 },
440                 "ConfigRegistry": {
441                         "type": "object",
442                         "description": "Registry of factory functions to create Config objects"
443                 },
444                 "namespaces": {
445                         "type": "array",
446                         "description": "Method to add extra namespaces",
447                         "items": {
448                                 "type": "object",
449                                 "properties": {
450                                         "id": {
451                                                 "type": "integer"
452                                         },
453                                         "constant": {
454                                                 "type": "string"
455                                         },
456                                         "name": {
457                                                 "type": "string"
458                                         },
459                                         "gender": {
460                                                 "type": "object",
461                                                 "properties": {
462                                                         "male": {
463                                                                 "type": "string"
464                                                         },
465                                                         "female": {
466                                                                 "type": "string"
467                                                         }
468                                                 }
469                                         },
470                                         "subpages": {
471                                                 "type": "boolean",
472                                                 "default": false
473                                         },
474                                         "content": {
475                                                 "type": "boolean",
476                                                 "default": false
477                                         },
478                                         "defaultcontentmodel": {
479                                                 "type": "string"
480                                         },
481                                         "protection": {
482                                                 "type": ["string", "array"],
483                                                 "description": "Userright(s) required to edit in this namespace"
484                                         },
485                                         "capitallinkoverride": {
486                                                 "type": "boolean",
487                                                 "description": "Set $wgCapitalLinks on a per-namespace basis"
488                                         }
489                                 },
490                                 "required": ["id", "constant", "name"]
491                         }
492                 },
493                 "TrackingCategories": {
494                         "type": "array",
495                         "description": "Tracking category message keys"
496                 },
497                 "DefaultUserOptions": {
498                         "type": "object",
499                         "description": "Default values of user options"
500                 },
501                 "HiddenPrefs": {
502                         "type": "array",
503                         "description": "Preferences users cannot set"
504                 },
505                 "GroupPermissions": {
506                         "type": "object",
507                         "description": "Default permissions to give to user groups"
508                 },
509                 "RevokePermissions": {
510                         "type": "object",
511                         "description": "Default permissions to revoke from user groups"
512                 },
513                 "ImplicitGroups": {
514                         "type": "array",
515                         "description": "Implicit groups"
516                 },
517                 "GroupsAddToSelf": {
518                         "type": "object",
519                         "description": "Groups a user can add to themselves"
520                 },
521                 "GroupsRemoveFromSelf": {
522                         "type": "object",
523                         "description": "Groups a user can remove from themselves"
524                 },
525                 "AddGroups": {
526                         "type": "object",
527                         "description": "Groups a user can add to users"
528                 },
529                 "RemoveGroups": {
530                         "type": "object",
531                         "description": "Groups a user can remove from users"
532                 },
533                 "AvailableRights": {
534                         "type": "array",
535                         "description": "User rights added by the extension"
536                 },
537                 "ContentHandlers": {
538                         "type": "object",
539                         "description": "Mapping of model ID to class name"
540                 },
541                 "RateLimits": {
542                         "type": "object",
543                         "description": "Rate limits"
544                 },
545                 "RecentChangesFlags": {
546                         "type": "object",
547                         "description": "Flags (letter symbols) shown on RecentChanges pages"
548                 },
549                 "MediaHandlers": {
550                         "type": "object",
551                         "description": "Plugins for media file type handling. Each entry in the array maps a MIME type to a PHP class name."
552                 },
553                 "ExtensionFunctions": {
554                         "type": [
555                                 "array",
556                                 "string"
557                         ],
558                         "description": "Function to call after setup has finished"
559                 },
560                 "ExtensionMessagesFiles": {
561                         "type": "object",
562                         "description": "File paths containing PHP internationalization data"
563                 },
564                 "MessagesDirs": {
565                         "type": "object",
566                         "description": "Directory paths containing JSON internationalization data"
567                 },
568                 "ExtensionEntryPointListFiles": {
569                         "type": "object"
570                 },
571                 "SpecialPages": {
572                         "type": "object",
573                         "description": "SpecialPages implemented in this extension (mapping of page name to class name)"
574                 },
575                 "AutoloadClasses": {
576                         "type": "object"
577                 },
578                 "Hooks": {
579                         "type": "object",
580                         "description": "Hooks this extension uses (mapping of hook name to callback)"
581                 },
582                 "JobClasses": {
583                         "type": "object",
584                         "description": "Job types this extension implements (mapping of job type to class name)"
585                 },
586                 "LogTypes": {
587                         "type": "array",
588                         "description": "List of new log types this extension uses"
589                 },
590                 "LogRestrictions": {
591                         "type": "object"
592                 },
593                 "FilterLogTypes": {
594                         "type": "object"
595                 },
596                 "LogNames": {
597                         "type": "object"
598                 },
599                 "LogHeaders": {
600                         "type": "object"
601                 },
602                 "LogActions": {
603                         "type": "object"
604                 },
605                 "LogActionsHandlers": {
606                         "type": "object"
607                 },
608                 "Actions": {
609                         "type": "object"
610                 },
611                 "APIModules": {
612                         "type": "object"
613                 },
614                 "APIFormatModules": {
615                         "type": "object"
616                 },
617                 "APIMetaModules": {
618                         "type": "object"
619                 },
620                 "APIPropModules": {
621                         "type": "object"
622                 },
623                 "APIListModules": {
624                         "type": "object"
625                 },
626                 "ValidSkinNames": {
627                         "type": "object"
628                 },
629                 "SkinOOUIThemes": {
630                         "type": "object"
631                 },
632                 "callback": {
633                         "type": [
634                                 "array",
635                                 "string"
636                         ],
637                         "description": "A function to be called right after MediaWiki processes this file"
638                 },
639                 "config": {
640                         "type": "object",
641                         "description": "Configuration options for this extension",
642                         "patternProperties": {
643                                 "^[a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*$": {
644                                         "type": ["object", "array", "string", "integer", "null", "boolean"],
645                                         "properties": {
646                                                 "_merge_strategy": {
647                                                         "type": "string",
648                                                         "enum": [
649                                                                 "array_merge_recursive",
650                                                                 "array_plus_2d",
651                                                                 "array_plus",
652                                                                 "array_merge"
653                                                         ],
654                                                         "default": "array_merge"
655                                                 }
656                                         }
657                                 }
658                         }
659                 },
660                 "ParserTestFiles": {
661                         "type": "array",
662                         "description": "Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
663                 }
664         }