extension.schema.v2.json 25 KB

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