37 lines
881 B
PHTML
37 lines
881 B
PHTML
<?php
|
|
$breadcrumbs = [
|
|
['label' => t('Home'), 'path' => 'admin'],
|
|
['label' => t('API docs')],
|
|
];
|
|
$specUrl = lurl('admin/api-docs/spec');
|
|
require templatePath('partials/app-breadcrumb.phtml');
|
|
?>
|
|
|
|
<div class="app-swagger-container">
|
|
<div id="swagger-ui"></div>
|
|
</div>
|
|
|
|
<script src="<?php e(assetVersion('vendor/swagger-ui/swagger-ui-bundle.js')); ?>"></script>
|
|
<script>
|
|
window.addEventListener('DOMContentLoaded', function () {
|
|
if (!window.SwaggerUIBundle) {
|
|
return;
|
|
}
|
|
|
|
window.SwaggerUIBundle({
|
|
url: '<?php e($specUrl); ?>',
|
|
dom_id: '#swagger-ui',
|
|
deepLinking: false,
|
|
displayRequestDuration: true,
|
|
filter: true,
|
|
docExpansion: 'list',
|
|
supportedSubmitMethods: [],
|
|
tryItOutEnabled: false,
|
|
presets: [
|
|
window.SwaggerUIBundle.presets.apis,
|
|
],
|
|
layout: 'BaseLayout'
|
|
});
|
|
});
|
|
</script>
|