-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.tmpl
47 lines (41 loc) · 1.44 KB
/
swagger.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="{{.AssetBase}}/swagger-ui.css" />
<link rel="stylesheet" type="text/css" href="{{.AssetBase}}/index.css" />
<link rel="icon" type="image/png" href="{{.AssetBase}}/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="{{.AssetBase}}/favicon-16x16.png" sizes="16x16" />
</head>
<body>
<div id="swagger-ui"></div>
<script src="{{.AssetBase}}/swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="{{.AssetBase}}/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script charset="UTF-8">
window.onload = function () {
//<editor-fold desc="Changeable Configuration Block">
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
window.ui = SwaggerUIBundle({
url: {{.SwaggerJson}},
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
defaultModelsExpandDepth: -1,
{{- range $key, $value := .Setting}}
{{$key}}: {{$value}},
{{- end}}
});
//</editor-fold>
};
</script>
</body>
</html>