Skip to content

Commit 16f5a56

Browse files
ronysandovalgithub-actions[bot]
authored andcommitted
Update swagger-ui to v5.17.0
1 parent 0aef9c1 commit 16f5a56

17 files changed

+73
-75
lines changed

dist/index.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
html {
2+
box-sizing: border-box;
3+
overflow: -moz-scrollbars-vertical;
4+
overflow-y: scroll;
5+
}
6+
7+
*,
8+
*:before,
9+
*:after {
10+
box-sizing: inherit;
11+
}
12+
13+
body {
14+
margin: 0;
15+
background: #fafafa;
16+
}

dist/oauth2-redirect.html

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
<title>Swagger UI: OAuth2 Redirect</title>
55
</head>
66
<body>
7-
</body>
8-
</html>
97
<script>
108
'use strict';
119
function run () {
@@ -15,31 +13,32 @@
1513
var isValid, qp, arr;
1614

1715
if (/code|token|error/.test(window.location.hash)) {
18-
qp = window.location.hash.substring(1);
16+
qp = window.location.hash.substring(1).replace('?', '&');
1917
} else {
2018
qp = location.search.substring(1);
2119
}
2220

23-
arr = qp.split("&")
24-
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('=', '":"') + '"';});
2523
qp = qp ? JSON.parse('{' + arr.join() + '}',
2624
function (key, value) {
27-
return key === "" ? value : decodeURIComponent(value)
25+
return key === "" ? value : decodeURIComponent(value);
2826
}
29-
) : {}
27+
) : {};
3028

31-
isValid = qp.state === sentState
29+
isValid = qp.state === sentState;
3230

3331
if ((
34-
oauth2.auth.schema.get("flow") === "accessCode"||
35-
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"
3635
) && !oauth2.auth.code) {
3736
if (!isValid) {
3837
oauth2.errCb({
3938
authId: oauth2.auth.name,
4039
source: "auth",
4140
level: "warning",
42-
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
41+
message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
4342
});
4443
}
4544

@@ -48,7 +47,7 @@
4847
oauth2.auth.code = qp.code;
4948
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
5049
} else {
51-
let oauthErrorMsg
50+
let oauthErrorMsg;
5251
if (qp.error) {
5352
oauthErrorMsg = "["+qp.error+"]: " +
5453
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
@@ -59,7 +58,7 @@
5958
authId: oauth2.auth.name,
6059
source: "auth",
6160
level: "error",
62-
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
61+
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
6362
});
6463
}
6564
} else {
@@ -68,7 +67,13 @@
6867
window.close();
6968
}
7069

71-
window.addEventListener('DOMContentLoaded', function () {
72-
run();
73-
});
70+
if (document.readyState !== 'loading') {
71+
run();
72+
} else {
73+
document.addEventListener('DOMContentLoaded', function () {
74+
run();
75+
});
76+
}
7477
</script>
78+
</body>
79+
</html>

dist/swagger-initializer.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
window.onload = function() {
2+
//<editor-fold desc="Changeable Configuration Block">
3+
4+
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
5+
window.ui = SwaggerUIBundle({
6+
url: "https://petstore.swagger.io/v2/swagger.json",
7+
dom_id: '#swagger-ui',
8+
deepLinking: true,
9+
presets: [
10+
SwaggerUIBundle.presets.apis,
11+
SwaggerUIStandalonePreset
12+
],
13+
plugins: [
14+
SwaggerUIBundle.plugins.DownloadUrl
15+
],
16+
layout: "StandaloneLayout"
17+
});
18+
19+
//</editor-fold>
20+
};

dist/swagger-ui-bundle.js

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

dist/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.

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

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

dist/swagger-ui-es-bundle-core.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.

dist/swagger-ui-es-bundle.js

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

dist/swagger-ui-es-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.

dist/swagger-ui-standalone-preset.js

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)