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