mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 15:55:18 +00:00
update swagger-ui to latest version 3.52.5 (#1026)
This commit is contained in:
parent
45c7785859
commit
baab2b957c
@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Swagger UI</title>
|
<title>Swagger UI</title>
|
||||||
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
|
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
|
||||||
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
|
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
|
||||||
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
|
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
|
||||||
<style>
|
<style>
|
||||||
@ -33,8 +33,8 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="swagger-ui"></div>
|
<div id="swagger-ui"></div>
|
||||||
|
|
||||||
<script src="./swagger-ui-bundle.js"> </script>
|
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
|
||||||
<script src="./swagger-ui-standalone-preset.js"> </script>
|
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
|
||||||
<script>
|
<script>
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
// Begin Swagger UI call region
|
// Begin Swagger UI call region
|
||||||
@ -50,11 +50,11 @@
|
|||||||
SwaggerUIBundle.plugins.DownloadUrl
|
SwaggerUIBundle.plugins.DownloadUrl
|
||||||
],
|
],
|
||||||
layout: "StandaloneLayout"
|
layout: "StandaloneLayout"
|
||||||
})
|
});
|
||||||
// End Swagger UI call region
|
// End Swagger UI call region
|
||||||
|
|
||||||
window.ui = ui
|
window.ui = ui;
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
<title>Swagger UI: OAuth2 Redirect</title>
|
<head>
|
||||||
<body onload="run()">
|
<title>Swagger UI: OAuth2 Redirect</title>
|
||||||
</body>
|
</head>
|
||||||
</html>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
function run () {
|
function run () {
|
||||||
@ -18,19 +18,20 @@
|
|||||||
qp = location.search.substring(1);
|
qp = location.search.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
arr = qp.split("&")
|
arr = qp.split("&");
|
||||||
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
|
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
|
||||||
qp = qp ? JSON.parse('{' + arr.join() + '}',
|
qp = qp ? JSON.parse('{' + arr.join() + '}',
|
||||||
function (key, value) {
|
function (key, value) {
|
||||||
return key === "" ? value : decodeURIComponent(value)
|
return key === "" ? value : decodeURIComponent(value);
|
||||||
}
|
}
|
||||||
) : {}
|
) : {};
|
||||||
|
|
||||||
isValid = qp.state === sentState
|
isValid = qp.state === sentState;
|
||||||
|
|
||||||
if ((
|
if ((
|
||||||
oauth2.auth.schema.get("flow") === "accessCode"||
|
oauth2.auth.schema.get("flow") === "accessCode" ||
|
||||||
oauth2.auth.schema.get("flow") === "authorizationCode"
|
oauth2.auth.schema.get("flow") === "authorizationCode" ||
|
||||||
|
oauth2.auth.schema.get("flow") === "authorization_code"
|
||||||
) && !oauth2.auth.code) {
|
) && !oauth2.auth.code) {
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
oauth2.errCb({
|
oauth2.errCb({
|
||||||
@ -46,7 +47,7 @@
|
|||||||
oauth2.auth.code = qp.code;
|
oauth2.auth.code = qp.code;
|
||||||
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
|
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
|
||||||
} else {
|
} else {
|
||||||
let oauthErrorMsg
|
let oauthErrorMsg;
|
||||||
if (qp.error) {
|
if (qp.error) {
|
||||||
oauthErrorMsg = "["+qp.error+"]: " +
|
oauthErrorMsg = "["+qp.error+"]: " +
|
||||||
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
|
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
|
||||||
@ -65,4 +66,10 @@
|
|||||||
}
|
}
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.addEventListener('DOMContentLoaded', function () {
|
||||||
|
run();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
swagger-ui/swagger-ui-es-bundle-core.js
Normal file
3
swagger-ui/swagger-ui-es-bundle-core.js
Normal file
File diff suppressed because one or more lines are too long
1
swagger-ui/swagger-ui-es-bundle-core.js.map
Normal file
1
swagger-ui/swagger-ui-es-bundle-core.js.map
Normal file
File diff suppressed because one or more lines are too long
3
swagger-ui/swagger-ui-es-bundle.js
Normal file
3
swagger-ui/swagger-ui-es-bundle.js
Normal file
File diff suppressed because one or more lines are too long
1
swagger-ui/swagger-ui-es-bundle.js.map
Normal file
1
swagger-ui/swagger-ui-es-bundle.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user