Merge "Export mw.Message's string formatter as mw.format"
[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 },
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 "namespaces": {
424 "type": "object",
425 "description": "Method to add extra namespaces",
426 "properties": {
427 "id": {
428 "type": "integer"
429 },
430 "constant": {
431 "type": "string"
432 },
433 "name": {
434 "type": "string"
435 },
436 "gender": {
437 "type": "object",
438 "properties": {
439 "male": {
440 "type": "string"
441 },
442 "female": {
443 "type": "string"
444 }
445 }
446 },
447 "subpages": {
448 "type": "boolean",
449 "default": false
450 },
451 "content": {
452 "type": "boolean",
453 "default": false
454 },
455 "defaultcontentmodel": {
456 "type": "string"
457 }
458 }
459 },
460 "TrackingCategories": {
461 "type": "array",
462 "description": "Tracking category message keys"
463 },
464 "DefaultUserOptions": {
465 "type": "object",
466 "description": "Default values of user options"
467 },
468 "HiddenPrefs": {
469 "type": "array",
470 "description": "Preferences users cannot set"
471 },
472 "GroupPermissions": {
473 "type": "object",
474 "description": "Default permissions to give to user groups"
475 },
476 "RevokePermissions": {
477 "type": "object",
478 "description": "Default permissions to revoke from user groups"
479 },
480 "ImplicitGroups": {
481 "type": "array",
482 "description": "Implicit groups"
483 },
484 "GroupsAddToSelf": {
485 "type": "object",
486 "description": "Groups a user can add to themselves"
487 },
488 "GroupsRemoveFromSelf": {
489 "type": "object",
490 "description": "Groups a user can remove from themselves"
491 },
492 "AddGroups": {
493 "type": "object",
494 "description": "Groups a user can add to users"
495 },
496 "RemoveGroups": {
497 "type": "object",
498 "description": "Groups a user can remove from users"
499 },
500 "AvailableRights": {
501 "type": "array",
502 "description": "User rights added by the extension"
503 },
504 "ContentHandlers": {
505 "type": "object",
506 "description": "Mapping of model ID to class name"
507 },
508 "RateLimits": {
509 "type": "object",
510 "description": "Rate limits"
511 },
512 "ParserTestFiles": {
513 "type": "array",
514 "description": "Parser test files to run"
515 },
516 "RecentChangesFlags": {
517 "type": "object",
518 "description": "Flags (letter symbols) shown on RecentChanges pages"
519 },
520 "ExtensionFunctions": {
521 "type": [
522 "array",
523 "string"
524 ],
525 "description": "Function to call after setup has finished"
526 },
527 "ExtensionMessagesFiles": {
528 "type": "object",
529 "description": "File paths containing PHP internationalization data"
530 },
531 "MessagesDirs": {
532 "type": "object",
533 "description": "Directory paths containing JSON internationalization data"
534 },
535 "ExtensionEntryPointListFiles": {
536 "type": "object"
537 },
538 "SpecialPages": {
539 "type": "object",
540 "description": "SpecialPages implemented in this extension (mapping of page name to class name)"
541 },
542 "SpecialPageGroups": {
543 "type": "object",
544 "description": "Mapping of special page name to group it belongs to"
545 },
546 "AutoloadClasses": {
547 "type": "object"
548 },
549 "Hooks": {
550 "type": "object",
551 "description": "Hooks this extension uses (mapping of hook name to callback)"
552 },
553 "JobClasses": {
554 "type": "object",
555 "description": "Job types this extension implements (mapping of job type to class name)"
556 },
557 "LogTypes": {
558 "type": "array",
559 "description": "List of new log types this extension uses"
560 },
561 "LogRestrictions": {
562 "type": "object"
563 },
564 "FilterLogTypes": {
565 "type": "array"
566 },
567 "LogNames": {
568 "type": "object"
569 },
570 "LogHeaders": {
571 "type": "object"
572 },
573 "LogActions": {
574 "type": "object"
575 },
576 "LogActionsHandlers": {
577 "type": "object"
578 },
579 "Actions": {
580 "type": "object"
581 },
582 "APIModules": {
583 "type": "object"
584 },
585 "APIFormatModules": {
586 "type": "object"
587 },
588 "APIMetaModules": {
589 "type": "object"
590 },
591 "APIPropModules": {
592 "type": "object"
593 },
594 "APIListModules": {
595 "type": "object"
596 },
597 "callback": {
598 "type": [
599 "array",
600 "string"
601 ],
602 "description": "A function to be called right after MediaWiki processes this file"
603 },
604 "config": {
605 "type": "object",
606 "description": "Configuration options for this extension"
607 }
608 }
609 }