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