<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>{{app_name}}</title>
  <link rel="stylesheet" type="text/css" href="{{base_url}}/swagger-ui.css" >
  <link rel="icon" type="image/png" href="{{base_url}}/favicon-32x32.png" sizes="32x32" />
  <link rel="icon" type="image/png" href="{{base_url}}/favicon-16x16.png" sizes="16x16" />
  <style>
    html
    {
        box-sizing: border-box;
        overflow: -moz-scrollbars-vertical;
        overflow-y: scroll;
    }

    *,
    *:before,
    *:after
    {
        box-sizing: inherit;
    }

    body
    {
      margin:0;
      background: #fafafa;
    }
  </style>
</head>

<body>
<div id="swagger-ui"></div>

<script src="{{base_url}}/swagger-ui-bundle.js"> </script>
<script src="{{base_url}}/swagger-ui-standalone-preset.js"> </script>
<script>
var config = {
  presets: [
    SwaggerUIBundle.presets.apis,
    SwaggerUIStandalonePreset
  ],
  plugins: [
    SwaggerUIBundle.plugins.DownloadUrl
  ]
};
var user_config = {{config_json|safe}};  // User config options provided from Python code
for (var attrname in user_config) { config[attrname] = user_config[attrname]; }

window.onload = function() {
  // Build a system
  const ui = SwaggerUIBundle(config)

  {% if oauth_config_json %}
    var oauth_user_config = {{oauth_config_json|safe}};  // OAuth2 user config options provided from Python code
    ui.initOAuth(oauth_user_config);
  {% endif %}

  window.ui = ui
}
</script>
</body>
</html>
