Skip to content

Commit

Permalink
Update swagger-ui static files to version 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
slymit authored and Maksim committed Jan 26, 2022
1 parent 397a485 commit 727d2c1
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 134 deletions.
10 changes: 5 additions & 5 deletions aiohttp_apispec/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<body>
<div id="swagger-ui"></div>

<script src="{{ static }}/swagger-ui-bundle.js"> </script>
<script src="{{ static }}/swagger-ui-standalone-preset.js"> </script>
<script src="{{ static }}/swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="{{ static }}/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script>
window.onload = function() {
// Begin Swagger UI call region
Expand All @@ -50,11 +50,11 @@
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
});
// End Swagger UI call region

window.ui = ui
}
window.ui = ui;
};
</script>
</body>
</html>
30 changes: 19 additions & 11 deletions aiohttp_apispec/static/oauth2-redirect.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!doctype html>
<html lang="en-US">
<body onload="run()">
</body>
</html>
<head>
<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
<script>
'use strict';
function run () {
Expand All @@ -17,19 +18,20 @@
qp = location.search.substring(1);
}

arr = qp.split("&")
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
arr = qp.split("&");
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value)
return key === "" ? value : decodeURIComponent(value);
}
) : {}
) : {};

isValid = qp.state === sentState
isValid = qp.state === sentState;

if ((
oauth2.auth.schema.get("flow") === "accessCode"||
oauth2.auth.schema.get("flow") === "authorizationCode"
oauth2.auth.schema.get("flow") === "accessCode" ||
oauth2.auth.schema.get("flow") === "authorizationCode" ||
oauth2.auth.schema.get("flow") === "authorization_code"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
Expand All @@ -45,7 +47,7 @@
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg
let oauthErrorMsg;
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
Expand All @@ -64,4 +66,10 @@
}
window.close();
}

window.addEventListener('DOMContentLoaded', function () {
run();
});
</script>
</body>
</html>
94 changes: 2 additions & 92 deletions aiohttp_apispec/static/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aiohttp_apispec/static/swagger-ui-bundle.js.map

Large diffs are not rendered by default.

15 changes: 2 additions & 13 deletions aiohttp_apispec/static/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aiohttp_apispec/static/swagger-ui-standalone-preset.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions aiohttp_apispec/static/swagger-ui.css

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions aiohttp_apispec/static/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aiohttp_apispec/static/swagger-ui.js.map

Large diffs are not rendered by default.

0 comments on commit 727d2c1

Please sign in to comment.