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