Remove left-over references from comments to removed FSRepo class
[lhc/web/wiklou.git] / docs / extension.schema.v2.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 },
35 "version": {
36 "type": "string",
37 "description": "The version of this release of the extension."
38 },
39 "url": {
40 "type": "string",
41 "description": "URL to the homepage for the extension.",
42 "format": "uri"
43 },
44 "description": {
45 "type": "string",
46 "description": "Raw description of the extension."
47 },
48 "descriptionmsg": {
49 "type": "string",
50 "description": "Message key for a i18n message describing the extension."
51 },
52 "license-name": {
53 "type": "string",
54 "description": "SPDX identifier for the license under which the extension is released."
55 },
56 "requires": {
57 "type": "object",
58 "description": "Indicates what versions of MediaWiki core or extensions are required. This syntax may be extended in the future, for example to check dependencies between other services.",
59 "properties": {
60 "MediaWiki": {
61 "type": "string",
62 "description": "Version constraint string against MediaWiki core."
63 },
64 "extensions": {
65 "type": "object",
66 "description": "Set of version constraint strings against specific extensions."
67 },
68 "skins": {
69 "type": "object",
70 "description": "Set of version constraint strings against specific skins."
71 }
72 }
73 },
74 "ResourceFileModulePaths": {
75 "type": "object",
76 "description": "Default paths to use for all ResourceLoader file modules",
77 "additionalProperties": false,
78 "properties": {
79 "localBasePath": {
80 "type": "string",
81 "description": "Base path to prepend to all local paths, relative to current directory"
82 },
83 "remoteExtPath": {
84 "type": "string",
85 "description": "Base path to prepend to all remote paths, relative to $wgExtensionAssetsPath"
86 },
87 "remoteSkinPath": {
88 "type": "string",
89 "description": "Base path to prepend to all remote paths, relative to $wgStylePath"
90 }
91 }
92 },
93 "ResourceModules": {
94 "type": "object",
95 "description": "ResourceLoader modules to register",
96 "patternProperties": {
97 "^[a-zA-Z0-9-\\.]+$": {
98 "type": "object",
99 "anyOf": [
100 {
101 "description": "A ResourceLoaderFileModule definition",
102 "additionalProperties": false,
103 "properties": {
104 "localBasePath": {
105 "type": "string",
106 "description": "Base path to prepend to all local paths in $options. Defaults to $IP"
107 },
108 "remoteBasePath": {
109 "type": "string",
110 "description": "Base path to prepend to all remote paths in $options. Defaults to $wgScriptPath"
111 },
112 "remoteExtPath": {
113 "type": "string",
114 "description": "Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath"
115 },
116 "skipFunction": {
117 "type": "string",
118 "description": "Path to a file containing a JavaScript \"skip function\", if desired."
119 },
120 "scripts": {
121 "type": ["string", "array"],
122 "description": "Scripts to always include (array of file paths)",
123 "items": {
124 "type": "string"
125 }
126 },
127 "languageScripts": {
128 "type": "object",
129 "description": "Scripts to include in specific language contexts (mapping of language code to file path(s))",
130 "patternProperties": {
131 "^[a-zA-Z0-9-]{2,}$": {
132 "type": [
133 "string",
134 "array"
135 ],
136 "items": {
137 "type": "string"
138 }
139 }
140 }
141 },
142 "skinScripts": {
143 "type": "object",
144 "description": "Scripts to include in specific skin contexts (mapping of skin name to script(s)",
145 "patternProperties": {
146 ".+": {
147 "type": [
148 "string",
149 "array"
150 ],
151 "items": {
152 "type": "string"
153 }
154 }
155 }
156 },
157 "debugScripts": {
158 "type": ["string", "array"],
159 "description": "Scripts to include in debug contexts",
160 "items": {
161 "type": "string"
162 }
163 },
164 "loaderScripts": {
165 "type": ["string", "array"],
166 "description": "Scripts to include in the startup module",
167 "items": {
168 "type": "string"
169 }
170 },
171 "dependencies": {
172 "type": ["string", "array"],
173 "description": "Modules which must be loaded before this module",
174 "items": {
175 "type": "string"
176 }
177 },
178 "styles": {
179 "type": ["string", "array", "object"],
180 "description": "Styles to always load",
181 "items": {
182 "type": "string"
183 }
184 },
185 "skinStyles": {
186 "type": "object",
187 "description": "Styles to include in specific skin contexts (mapping of skin name to style(s))",
188 "patternProperties": {
189 ".+": {
190 "type": [
191 "string",
192 "array"
193 ],
194 "items": {
195 "type": "string"
196 }
197 }
198 }
199 },
200 "messages": {
201 "type": ["string", "array"],
202 "description": "Messages to always load",
203 "items": {
204 "type": "string"
205 }
206 },
207 "group": {
208 "type": "string",
209 "description": "Group with which this module should be loaded"
210 },
211 "deprecated": {
212 "type": ["object", "boolean"],
213 "description": "Whether the module is deprecated and usage is discouraged. Either a boolean or an object with key message can be used to customise deprecation message."
214 },
215 "position": {
216 "type": "string",
217 "description": "Position on the page to load this module at",
218 "enum": [
219 "bottom",
220 "top"
221 ]
222 },
223 "templates": {
224 "type": ["object", "array"],
225 "description": "Templates to be loaded for client-side usage"
226 },
227 "targets": {
228 "type": ["string", "array"],
229 "description": "ResourceLoader target the module can run on",
230 "items": {
231 "type": "string"
232 }
233 },
234 "noflip": {
235 "type": "boolean",
236 "description": "Whether to skip CSSJanus LTR-to-RTL flipping for this module. Recommended for styles imported from libraries that already properly handle their RTL styles. Default is false, meaning CSSJanus will be applied on RTL-mode output."
237 }
238 }
239 },
240 {
241 "description": "A ResourceLoaderWikiModule definition",
242 "additionalProperties": false,
243 "properties": {
244 "class": {
245 "enum": ["ResourceLoaderWikiModule"]
246 },
247 "group": {
248 "type": "string",
249 "description": "Group with which this module should be loaded"
250 },
251 "position": {
252 "type": "string",
253 "description": "Position on the page to load this module at",
254 "enum": [
255 "bottom",
256 "top"
257 ]
258 },
259 "targets": {
260 "type": ["string", "array"],
261 "description": "ResourceLoader target the module can run on",
262 "items": {
263 "type": "string"
264 }
265 },
266 "scripts": {
267 "type": "array",
268 "description": "A list of on-wiki pages containing JavaScript that should be loaded",
269 "items": {
270 "type": "string"
271 }
272 },
273 "styles": {
274 "type": "array",
275 "description": "A list of on-wiki pages containing CSS that should be loaded",
276 "items": {
277 "type": "string"
278 }
279 }
280 }
281 },
282 {
283 "description": "A ResourceLoaderImageModule definition",
284 "additionalProperties": false,
285 "properties": {
286 "class": {
287 "enum": ["ResourceLoaderImageModule"]
288 },
289 "data": {
290 "type": "string"
291 },
292 "prefix": {
293 "type": "string"
294 },
295 "selector": {
296 "type": "string"
297 },
298 "selectorWithoutVariant": {
299 "type": "string"
300 },
301 "selectorWithVariant": {
302 "type": "string"
303 },
304 "variants": {
305 "type": "object"
306 },
307 "images": {
308 "type": "object"
309 },
310 "position": {
311 "enum": [
312 "top",
313 "bottom"
314 ]
315 }
316 }
317 },
318 {
319 "description": "An arbitrary ResourceLoaderModule definition",
320 "properties": {
321 "class": {
322 "type": "string",
323 "pattern": "^((?!ResourceLoader(File|Image)Module).)*$"
324 }
325 },
326 "required": ["class"]
327 }
328 ]
329 }
330 }
331 },
332 "ResourceModuleSkinStyles": {
333 "type": "object",
334 "description": "ResourceLoader modules for custom skin styles"
335 },
336 "ResourceLoaderSources": {
337 "type": "object",
338 "description": "ResourceLoader sources to register"
339 },
340 "ResourceLoaderLESSVars": {
341 "type": "object",
342 "description": "ResourceLoader LESS variables"
343 },
344 "ConfigRegistry": {
345 "type": "object",
346 "description": "Registry of factory functions to create Config objects"
347 },
348 "SessionProviders": {
349 "type": "object",
350 "description": "Session providers"
351 },
352 "AuthManagerAutoConfig": {
353 "type": "object",
354 "description": "AuthManager auto-configuration",
355 "additionalProperties": false,
356 "properties": {
357 "preauth": {
358 "type": "object",
359 "description": "Pre-authentication providers"
360 },
361 "primaryauth": {
362 "type": "object",
363 "description": "Primary authentication providers"
364 },
365 "secondaryauth": {
366 "type": "object",
367 "description": "Secondary authentication providers"
368 }
369 }
370 },
371 "CentralIdLookupProviders": {
372 "type": "object",
373 "description": "Central ID lookup providers"
374 },
375 "ChangeCredentialsBlacklist": {
376 "type": "object",
377 "description": "AuthenticationRequest classes which can only be used internally for credentials change"
378 },
379 "RemoveCredentialsBlacklist": {
380 "type": "object",
381 "description": "AuthenticationRequest classes which can only be used internally for credentials removal"
382 },
383 "namespaces": {
384 "type": "array",
385 "description": "Method to add extra namespaces",
386 "items": {
387 "type": "object",
388 "properties": {
389 "id": {
390 "type": "integer"
391 },
392 "constant": {
393 "type": "string"
394 },
395 "name": {
396 "type": "string"
397 },
398 "gender": {
399 "type": "object",
400 "properties": {
401 "male": {
402 "type": "string"
403 },
404 "female": {
405 "type": "string"
406 }
407 }
408 },
409 "subpages": {
410 "type": "boolean",
411 "default": false
412 },
413 "content": {
414 "type": "boolean",
415 "default": false
416 },
417 "defaultcontentmodel": {
418 "type": "string"
419 },
420 "protection": {
421 "type": ["string", "array"],
422 "description": "Userright(s) required to edit in this namespace"
423 },
424 "capitallinkoverride": {
425 "type": "boolean",
426 "description": "Set $wgCapitalLinks on a per-namespace basis"
427 },
428 "conditional": {
429 "type": "boolean",
430 "description": "Whether the namespace is conditional upon configuration and should not be registered (requires separate registration via a hook)",
431 "default": false
432 }
433 },
434 "required": ["id", "constant", "name"]
435 }
436 },
437 "TrackingCategories": {
438 "type": "array",
439 "description": "Tracking category message keys",
440 "items": {
441 "type": "string"
442 }
443 },
444 "DefaultUserOptions": {
445 "type": "object",
446 "description": "Default values of user options"
447 },
448 "HiddenPrefs": {
449 "type": "array",
450 "description": "Preferences users cannot set",
451 "items": {
452 "type": "string"
453 }
454 },
455 "GroupPermissions": {
456 "type": "object",
457 "description": "Default permissions to give to user groups",
458 "patternProperties": {
459 "^[a-z]+$": {
460 "type": "object",
461 "patternProperties": {
462 "^[a-z]+$": {
463 "type": "boolean"
464 }
465 }
466 }
467 }
468 },
469 "RevokePermissions": {
470 "type": "object",
471 "description": "Default permissions to revoke from user groups",
472 "patternProperties": {
473 "^[a-z]+$": {
474 "type": "object",
475 "patternProperties": {
476 "^[a-z]+$": {
477 "type": "boolean"
478 }
479 }
480 }
481 }
482 },
483 "GrantPermissions": {
484 "type": "object",
485 "description": "Map of permissions granted to authorized consumers to their bundles, called 'grants'",
486 "patternProperties": {
487 "^[a-z]+$": {
488 "type": "object",
489 "patternProperties": {
490 "^[a-z]+$": {
491 "type": "boolean"
492 }
493 }
494 }
495 }
496 },
497 "GrantPermissionGroups": {
498 "type": "object",
499 "description": "Map of grants to their UI grouping",
500 "patternProperties": {
501 "^[a-z]+$": {
502 "type": "string"
503 }
504 }
505 },
506 "ImplicitGroups": {
507 "type": "array",
508 "description": "Implicit groups"
509 },
510 "GroupsAddToSelf": {
511 "type": "object",
512 "description": "Groups a user can add to themselves"
513 },
514 "GroupsRemoveFromSelf": {
515 "type": "object",
516 "description": "Groups a user can remove from themselves"
517 },
518 "AddGroups": {
519 "type": "object",
520 "description": "Groups a user can add to users"
521 },
522 "RemoveGroups": {
523 "type": "object",
524 "description": "Groups a user can remove from users"
525 },
526 "AvailableRights": {
527 "type": "array",
528 "description": "User rights added by the extension",
529 "items": {
530 "type": "string"
531 }
532 },
533 "ContentHandlers": {
534 "type": "object",
535 "description": "Mapping of model ID to class name",
536 "patternProperties": {
537 "^[A-Za-z]+$": {
538 "type": "string"
539 }
540 }
541 },
542 "RateLimits": {
543 "type": "object",
544 "description": "Rate limits"
545 },
546 "RecentChangesFlags": {
547 "type": "object",
548 "description": "Flags (letter symbols) shown on RecentChanges pages"
549 },
550 "MediaHandlers": {
551 "type": "object",
552 "description": "Plugins for media file type handling. Each entry in the array maps a MIME type to a PHP class name."
553 },
554 "ExtensionFunctions": {
555 "type": [
556 "array",
557 "string"
558 ],
559 "description": "Function to call after setup has finished",
560 "items": {
561 "type": "string"
562 }
563 },
564 "ExtensionMessagesFiles": {
565 "type": "object",
566 "description": "File paths containing PHP internationalization data"
567 },
568 "MessagesDirs": {
569 "type": "object",
570 "description": "Directory paths containing JSON internationalization data"
571 },
572 "ExtensionEntryPointListFiles": {
573 "type": "object"
574 },
575 "SpecialPages": {
576 "type": "object",
577 "description": "SpecialPages implemented in this extension (mapping of page name to class name)"
578 },
579 "AutoloadClasses": {
580 "type": "object"
581 },
582 "Hooks": {
583 "type": [ "string", "object" ],
584 "description": "Hooks this extension uses (mapping of hook name to callback)"
585 },
586 "JobClasses": {
587 "type": "object",
588 "description": "Job types this extension implements (mapping of job type to class name)"
589 },
590 "LogTypes": {
591 "type": "array",
592 "description": "List of new log types this extension uses"
593 },
594 "LogRestrictions": {
595 "type": "object"
596 },
597 "FilterLogTypes": {
598 "type": "object"
599 },
600 "ActionFilteredLogs": {
601 "type": "object",
602 "description": "List of log types which can be filtered by log actions",
603 "patternProperties": {
604 "^[a-z-]+$": {
605 "type": "object",
606 "patternProperties": {
607 "^[a-z-]+$": {
608 "type": "array",
609 "items": {
610 "type": "string"
611 }
612 }
613 }
614 }
615 }
616 },
617 "LogNames": {
618 "type": "object"
619 },
620 "LogHeaders": {
621 "type": "object"
622 },
623 "LogActions": {
624 "type": "object"
625 },
626 "LogActionsHandlers": {
627 "type": "object"
628 },
629 "Actions": {
630 "type": "object"
631 },
632 "APIModules": {
633 "type": "object"
634 },
635 "APIFormatModules": {
636 "type": "object"
637 },
638 "APIMetaModules": {
639 "type": "object"
640 },
641 "APIPropModules": {
642 "type": "object"
643 },
644 "APIListModules": {
645 "type": "object"
646 },
647 "ValidSkinNames": {
648 "type": "object"
649 },
650 "FeedClasses": {
651 "type": "object",
652 "description": "Available feeds objects"
653 },
654 "SkinOOUIThemes": {
655 "type": "object"
656 },
657 "PasswordPolicy": {
658 "type": "object",
659 "description": "Password policies"
660 },
661 "FileExtensions": {
662 "type": "array",
663 "description": "Preferred file extensions for uploading",
664 "items": {
665 "type": "string"
666 }
667 },
668 "callback": {
669 "type": [
670 "array",
671 "string"
672 ],
673 "description": "A function to be called right after MediaWiki processes this file"
674 },
675 "config_prefix": {
676 "type": "string",
677 "default": "wg",
678 "description": "Prefix to put in front of configuration settings when exporting them to $GLOBALS"
679 },
680 "config": {
681 "type": "object",
682 "description": "Configuration options for this extension",
683 "patternProperties": {
684 "^[a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*$": {
685 "type": "object",
686 "properties": {
687 "value": {
688 "required": true
689 },
690 "merge_strategy": {
691 "type": "string",
692 "enum": [
693 "array_merge_recursive",
694 "array_replace_recursive",
695 "array_plus_2d",
696 "array_plus",
697 "array_merge"
698 ],
699 "default": "array_merge"
700 },
701 "path": {
702 "description": "Whether this should be interpreted as a filesystem path, relative to extension directory root",
703 "type": "boolean",
704 "default": false
705 },
706 "description": {
707 "type": ["string", "array"],
708 "description": "A description of the config setting, mostly for documentation/developers"
709 }
710 }
711 }
712 }
713 },
714 "ParserTestFiles": {
715 "type": "array",
716 "description": "Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
717 },
718 "ServiceWiringFiles": {
719 "type": "array",
720 "description": "List of service wiring files to be loaded by the default instance of MediaWikiServices"
721 },
722 "load_composer_autoloader": {
723 "type": "boolean",
724 "description": "Load the composer autoloader for this extension, if one is present"
725 }
726 }
727 }