const container = document.getElementById('swagger-ui');

if (container && window.SwaggerUIBundle) {
  window.SwaggerUIBundle({
    url: container.dataset.specUrl || '',
    dom_id: '#swagger-ui',
    deepLinking: false,
    displayRequestDuration: true,
    filter: true,
    docExpansion: 'list',
    supportedSubmitMethods: [],
    tryItOutEnabled: false,
    presets: [window.SwaggerUIBundle.presets.apis],
    layout: 'BaseLayout',
  });
}
