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