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