mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-03 16:19:26 +03:00
26 lines
644 B
JavaScript
26 lines
644 B
JavaScript
// This file is part of the API Platform project.
|
|
//
|
|
// (c) Kévin Dunglas <dunglas@gmail.com>
|
|
//
|
|
// For the full copyright and license information, please view the LICENSE
|
|
// file that was distributed with this source code.
|
|
|
|
window.onload = () => {
|
|
const data = JSON.parse(document.getElementById('swagger-data').innerText);
|
|
const ui = SwaggerUIBundle({
|
|
spec: data.spec,
|
|
dom_id: '#swagger-ui',
|
|
validatorUrl: null,
|
|
presets: [
|
|
SwaggerUIBundle.presets.apis,
|
|
SwaggerUIStandalonePreset
|
|
],
|
|
plugins: [
|
|
SwaggerUIBundle.plugins.DownloadUrl
|
|
],
|
|
layout: 'StandaloneLayout'
|
|
});
|
|
|
|
window.ui = ui;
|
|
};
|