Skip to content

Commit 88e4fc5

Browse files
committed
upgrade swagger-ui to v4.6.1
1 parent 2af0704 commit 88e4fc5

12 files changed

+76
-182
lines changed

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/swagger.iml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<title>Swagger UI</title>
7-
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
7+
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
88
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
99
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
1010
<style>
@@ -33,8 +33,8 @@
3333
<body>
3434
<div id="swagger-ui"></div>
3535

36-
<script src="./swagger-ui-bundle.js"> </script>
37-
<script src="./swagger-ui-standalone-preset.js"> </script>
36+
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
37+
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
3838
<script>
3939
window.onload = function() {
4040
// Begin Swagger UI call region
@@ -50,11 +50,11 @@
5050
SwaggerUIBundle.plugins.DownloadUrl
5151
],
5252
layout: "StandaloneLayout"
53-
})
53+
});
5454
// End Swagger UI call region
5555

56-
window.ui = ui
57-
}
56+
window.ui = ui;
57+
};
5858
</script>
5959
</body>
6060
</html>

oauth2-redirect.html

Lines changed: 23 additions & 12 deletions
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,14 @@
6566
}
6667
window.close();
6768
}
69+
70+
if (document.readyState !== 'loading') {
71+
run();
72+
} else {
73+
document.addEventListener('DOMContentLoaded', function () {
74+
run();
75+
});
76+
}
6877
</script>
78+
</body>
79+
</html>

swagger-ui-bundle.js

Lines changed: 2 additions & 133 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swagger-ui-es-bundle-core.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swagger-ui-es-bundle.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swagger-ui-standalone-preset.js

Lines changed: 2 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)