Localisation updates from https://translatewiki.net.
[mediawiki.git] / resources / src / mediawiki.special.restsandbox / restsandbox.js
blob2919dc98c1cda2a47e9cc69ddfacd54587559c3d
1 /*!
2  * JavaScript for Special:RestSandbox
3  */
4 ( function () {
5         const SwaggerUI = require( './../../lib/swagger-ui/swagger-ui-bundle.js' );
6         const SwaggerUIStandalonePreset = require( './../../lib/swagger-ui/swagger-ui-standalone-preset.js' );
8         const uiConfig = {
9                 // eslint-disable-next-line camelcase
10                 dom_id: '#mw-restsandbox-swagger-ui',
11                 presets: [
12                         SwaggerUI.presets.apis,
13                         SwaggerUIStandalonePreset
14                 ],
15                 // specUrl is set dynamically by SpecialRestSandbox
16                 url: mw.config.get( 'specUrl' )
17         };
19         window.ui = SwaggerUI( uiConfig );
20 }() );