<!DOCTYPE html>
<html>
<head>
    <link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3.38.0/swagger-ui.css">    
    <link rel="shortcut icon" href="https://ninja.rest-framework.com/favicon.png">
    <title>{{ api.title }}</title>
</head>
<body>
    <div id="swagger-ui">
    </div>

    <script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3.38.0/swagger-ui-bundle.js"></script>
    <script>
        const ui = SwaggerUIBundle({
            url: '{{ openapi_json_url }}',
            dom_id: '#swagger-ui',
            presets: [
            SwaggerUIBundle.presets.apis,
            SwaggerUIBundle.SwaggerUIStandalonePreset
            ],
            layout: "BaseLayout",
        {% if api.csrf and csrf_token %}
            requestInterceptor: (req) => {
				req.headers['X-CSRFToken'] = "{{csrf_token}}"
				return req;
			},
        {% endif %}
            deepLinking: true
        })
    </script>
</body>
</html>