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