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