Skip to content

Commit 96b6d4f

Browse files
Merge pull request #114 from slymit/issue-113
Update swagger-ui static files to version 4.1.0
2 parents e990e88 + 721ef68 commit 96b6d4f

File tree

9 files changed

+36
-134
lines changed

9 files changed

+36
-134
lines changed

aiohttp_apispec/static/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<body>
3434
<div id="swagger-ui"></div>
3535

36-
<script src="{{ static }}/swagger-ui-bundle.js"> </script>
37-
<script src="{{ static }}/swagger-ui-standalone-preset.js"> </script>
36+
<script src="{{ static }}/swagger-ui-bundle.js" charset="UTF-8"> </script>
37+
<script src="{{ static }}/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>

aiohttp_apispec/static/oauth2-redirect.html

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<!doctype html>
22
<html lang="en-US">
3-
<body onload="run()">
4-
</body>
5-
</html>
3+
<head>
4+
<title>Swagger UI: OAuth2 Redirect</title>
5+
</head>
6+
<body>
67
<script>
78
'use strict';
89
function run () {
@@ -17,19 +18,20 @@
1718
qp = location.search.substring(1);
1819
}
1920

20-
arr = qp.split("&")
21-
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('=', '":"') + '"';});
2223
qp = qp ? JSON.parse('{' + arr.join() + '}',
2324
function (key, value) {
24-
return key === "" ? value : decodeURIComponent(value)
25+
return key === "" ? value : decodeURIComponent(value);
2526
}
26-
) : {}
27+
) : {};
2728

28-
isValid = qp.state === sentState
29+
isValid = qp.state === sentState;
2930

3031
if ((
31-
oauth2.auth.schema.get("flow") === "accessCode"||
32-
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"
3335
) && !oauth2.auth.code) {
3436
if (!isValid) {
3537
oauth2.errCb({
@@ -45,7 +47,7 @@
4547
oauth2.auth.code = qp.code;
4648
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
4749
} else {
48-
let oauthErrorMsg
50+
let oauthErrorMsg;
4951
if (qp.error) {
5052
oauthErrorMsg = "["+qp.error+"]: " +
5153
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
@@ -64,4 +66,10 @@
6466
}
6567
window.close();
6668
}
69+
70+
window.addEventListener('DOMContentLoaded', function () {
71+
run();
72+
});
6773
</script>
74+
</body>
75+
</html>

aiohttp_apispec/static/swagger-ui-bundle.js

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

aiohttp_apispec/static/swagger-ui-bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aiohttp_apispec/static/swagger-ui-standalone-preset.js

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

aiohttp_apispec/static/swagger-ui-standalone-preset.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aiohttp_apispec/static/swagger-ui.css

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

aiohttp_apispec/static/swagger-ui.js

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

aiohttp_apispec/static/swagger-ui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)