Skip to content

Commit 85afc69

Browse files
committed
[api] update swagger ui
1 parent c22f4f1 commit 85afc69

File tree

6 files changed

+42
-49
lines changed

6 files changed

+42
-49
lines changed

pkg/swagger/docs/index.css

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
html {
2+
box-sizing: border-box;
3+
overflow: -moz-scrollbars-vertical;
4+
overflow-y: scroll;
5+
}
6+
7+
*,
8+
*:before,
9+
*:after {
10+
box-sizing: inherit;
11+
}
12+
13+
body {
14+
margin: 0;
15+
background: #fafafa;
16+
}

pkg/swagger/docs/index.html

+2-43
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,15 @@
55
<meta charset="UTF-8">
66
<title>Swagger UI</title>
77
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
8+
<link rel="stylesheet" type="text/css" href="index.css" />
89
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
910
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
10-
<style>
11-
html
12-
{
13-
box-sizing: border-box;
14-
overflow: -moz-scrollbars-vertical;
15-
overflow-y: scroll;
16-
}
17-
18-
*,
19-
*:before,
20-
*:after
21-
{
22-
box-sizing: inherit;
23-
}
24-
25-
body
26-
{
27-
margin:0;
28-
background: #fafafa;
29-
}
30-
</style>
3111
</head>
3212

3313
<body>
3414
<div id="swagger-ui"></div>
35-
3615
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
3716
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
38-
<script>
39-
window.onload = function() {
40-
// Begin Swagger UI call region
41-
const ui = SwaggerUIBundle({
42-
url: "./swagger.json",
43-
dom_id: '#swagger-ui',
44-
presets: [
45-
SwaggerUIBundle.presets.apis,
46-
SwaggerUIStandalonePreset
47-
],
48-
layout: "StandaloneLayout",
49-
layout: "BaseLayout",
50-
deepLinking: true,
51-
showExtensions: true,
52-
showCommonExtensions: true,
53-
});
54-
// End Swagger UI call region
55-
56-
window.ui = ui;
57-
};
58-
</script>
17+
<script src="./swagger-initializer.js" charset="UTF-8"> </script>
5918
</body>
6019
</html>
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
window.onload = function () {
2+
//<editor-fold desc="Changeable Configuration Block">
3+
4+
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
5+
window.ui = SwaggerUIBundle({
6+
url: "./swagger.json",
7+
dom_id: '#swagger-ui',
8+
deepLinking: true,
9+
showCommonExtensions: true,
10+
presets: [
11+
SwaggerUIBundle.presets.apis,
12+
SwaggerUIStandalonePreset
13+
],
14+
plugins: [
15+
16+
],
17+
layout: "BaseLayout",
18+
});
19+
20+
//</editor-fold>
21+
};

pkg/swagger/docs/swagger-ui-bundle.js

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/swagger/docs/swagger-ui-standalone-preset.js

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/swagger/docs/swagger-ui.css

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)