Skip to content

Commit 11b636b

Browse files
committed
chore: upgrade the Swagger UI version to 4.1.0
1 parent 51cabb1 commit 11b636b

14 files changed

+65
-205
lines changed

web/index.html

+26-25
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
11
<!-- HTML for static distribution bundle build -->
22
<!DOCTYPE html>
33
<html lang="en">
4-
5-
<head>
4+
<head>
65
<meta charset="UTF-8">
76
<title>Swagger UI</title>
8-
<link rel="stylesheet" type="text/css" href="./swagger-ui.css">
7+
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
98
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
109
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
1110
<style>
12-
html {
11+
html
12+
{
1313
box-sizing: border-box;
1414
overflow: -moz-scrollbars-vertical;
1515
overflow-y: scroll;
16-
}
16+
}
1717

18-
*,
19-
*:before,
20-
*:after {
18+
*,
19+
*:before,
20+
*:after
21+
{
2122
box-sizing: inherit;
22-
}
23+
}
2324

24-
body {
25-
margin: 0;
25+
body
26+
{
27+
margin:0;
2628
background: #fafafa;
27-
}
29+
}
2830
</style>
29-
</head>
31+
</head>
3032

31-
<body>
33+
<body>
3234
<div id="swagger-ui"></div>
33-
<script src="./swagger-ui-bundle.js"> </script>
34-
<script src="./swagger-ui-standalone-preset.js"> </script>
35+
36+
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
37+
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
3538
<script>
36-
window.onload = function () {
39+
window.onload = function() {
3740
// Begin Swagger UI call region
3841
const ui = SwaggerUIBundle({
3942
url: "api/swagger-spec/dblab_server_swagger.yaml",
@@ -47,13 +50,11 @@
4750
SwaggerUIBundle.plugins.DownloadUrl
4851
],
4952
layout: "StandaloneLayout"
50-
})
53+
});
5154
// End Swagger UI call region
5255

53-
window.ui = ui
54-
}
55-
56-
</script>
57-
</body>
58-
59-
</html>
56+
window.ui = ui;
57+
};
58+
</script>
59+
</body>
60+
</html>

web/oauth2-redirect.html

+19-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!doctype html>
22
<html lang="en-US">
3-
<title>Swagger UI: OAuth2 Redirect</title>
4-
<body onload="run()">
5-
</body>
6-
</html>
3+
<head>
4+
<title>Swagger UI: OAuth2 Redirect</title>
5+
</head>
6+
<body>
77
<script>
88
'use strict';
99
function run () {
@@ -18,19 +18,20 @@
1818
qp = location.search.substring(1);
1919
}
2020

21-
arr = qp.split("&")
22-
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
21+
arr = qp.split("&");
22+
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
2323
qp = qp ? JSON.parse('{' + arr.join() + '}',
2424
function (key, value) {
25-
return key === "" ? value : decodeURIComponent(value)
25+
return key === "" ? value : decodeURIComponent(value);
2626
}
27-
) : {}
27+
) : {};
2828

29-
isValid = qp.state === sentState
29+
isValid = qp.state === sentState;
3030

3131
if ((
32-
oauth2.auth.schema.get("flow") === "accessCode"||
33-
oauth2.auth.schema.get("flow") === "authorizationCode"
32+
oauth2.auth.schema.get("flow") === "accessCode" ||
33+
oauth2.auth.schema.get("flow") === "authorizationCode" ||
34+
oauth2.auth.schema.get("flow") === "authorization_code"
3435
) && !oauth2.auth.code) {
3536
if (!isValid) {
3637
oauth2.errCb({
@@ -46,7 +47,7 @@
4647
oauth2.auth.code = qp.code;
4748
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
4849
} else {
49-
let oauthErrorMsg
50+
let oauthErrorMsg;
5051
if (qp.error) {
5152
oauthErrorMsg = "["+qp.error+"]: " +
5253
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
@@ -65,4 +66,10 @@
6566
}
6667
window.close();
6768
}
69+
70+
window.addEventListener('DOMContentLoaded', function () {
71+
run();
72+
});
6873
</script>
74+
</body>
75+
</html>

web/swagger-ui-bundle.js

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

web/swagger-ui-bundle.js.map

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

web/swagger-ui-es-bundle-core.js

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

web/swagger-ui-es-bundle-core.js.map

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

web/swagger-ui-es-bundle.js

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

web/swagger-ui-es-bundle.js.map

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

web/swagger-ui-standalone-preset.js

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

web/swagger-ui-standalone-preset.js.map

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

web/swagger-ui.css

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

web/swagger-ui.css.map

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

web/swagger-ui.js

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

web/swagger-ui.js.map

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

0 commit comments

Comments
 (0)