Skip to content

Commit dd49ccf

Browse files
authored
[fit] upgrade swagger-ui, netty versions (#294)
* [fit] upgrade swagger-ui from v5.28.1 to v5.29.0 * [fit] upgrade netty from 4.2.2.Final to 4.2.6.Final
1 parent c919b29 commit dd49ccf

File tree

10 files changed

+10
-82
lines changed

10 files changed

+10
-82
lines changed

framework/fit/java/fit-builtin/plugins/fit-http-openapi3-swagger/src/main/java/modelengine/fit/http/openapi3/swagger/builder/InfoBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
public class InfoBuilder implements EntityBuilder<Info> {
2424
private static final String FIT_VERSION = "3.5.1-SNAPSHOT";
25-
private static final String SWAGGER_UI_VERSION = "v5.28.1";
25+
private static final String SWAGGER_UI_VERSION = "v5.29.0";
2626

2727
private final ApplicationConfig applicationConfig;
2828

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,6 @@
11
<!doctype html>
22
<html lang="en-US">
3-
<head>
4-
<title>Swagger UI: OAuth2 Redirect</title>
5-
</head>
63
<body>
7-
<script>
8-
'use strict';
9-
function run () {
10-
var oauth2 = window.opener.swaggerUIRedirectOauth2;
11-
var sentState = oauth2.state;
12-
var redirectUrl = oauth2.redirectUrl;
13-
var isValid, qp, arr;
14-
15-
if (/code|token|error/.test(window.location.hash)) {
16-
qp = window.location.hash.substring(1).replace('?', '&');
17-
} else {
18-
qp = location.search.substring(1);
19-
}
20-
21-
arr = qp.split("&");
22-
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
23-
qp = qp ? JSON.parse('{' + arr.join() + '}',
24-
function (key, value) {
25-
return key === "" ? value : decodeURIComponent(value);
26-
}
27-
) : {};
28-
29-
isValid = qp.state === sentState;
30-
31-
if ((
32-
oauth2.auth.schema.get("flow") === "accessCode" ||
33-
oauth2.auth.schema.get("flow") === "authorizationCode" ||
34-
oauth2.auth.schema.get("flow") === "authorization_code"
35-
) && !oauth2.auth.code) {
36-
if (!isValid) {
37-
oauth2.errCb({
38-
authId: oauth2.auth.name,
39-
source: "auth",
40-
level: "warning",
41-
message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
42-
});
43-
}
44-
45-
if (qp.code) {
46-
delete oauth2.state;
47-
oauth2.auth.code = qp.code;
48-
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
49-
} else {
50-
let oauthErrorMsg;
51-
if (qp.error) {
52-
oauthErrorMsg = "["+qp.error+"]: " +
53-
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
54-
(qp.error_uri ? "More info: "+qp.error_uri : "");
55-
}
56-
57-
oauth2.errCb({
58-
authId: oauth2.auth.name,
59-
source: "auth",
60-
level: "error",
61-
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
62-
});
63-
}
64-
} else {
65-
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
66-
}
67-
window.close();
68-
}
69-
70-
if (document.readyState !== 'loading') {
71-
run();
72-
} else {
73-
document.addEventListener('DOMContentLoaded', function () {
74-
run();
75-
});
76-
}
77-
</script>
784
</body>
795
</html>
6+
<script src="oauth2-redirect.js"></script>

framework/fit/java/fit-builtin/plugins/fit-http-openapi3-swagger/src/main/resources/static/oauth2-redirect.js

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

framework/fit/java/fit-builtin/plugins/fit-http-openapi3-swagger/src/main/resources/static/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.

framework/fit/java/fit-builtin/plugins/fit-http-openapi3-swagger/src/main/resources/static/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.

framework/fit/java/fit-builtin/plugins/fit-http-openapi3-swagger/src/main/resources/static/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.

framework/fit/java/fit-builtin/plugins/fit-http-openapi3-swagger/src/main/resources/static/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.

framework/fit/java/fit-builtin/plugins/fit-http-openapi3-swagger/src/main/resources/static/swagger-ui.css

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

framework/fit/java/fit-builtin/plugins/fit-http-openapi3-swagger/src/main/resources/static/swagger-ui.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.

framework/fit/java/fit-builtin/plugins/fit-http-server-netty/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<properties>
2020
<!-- Third-party versions -->
21-
<netty.version>4.2.2.Final</netty.version>
21+
<netty.version>4.2.6.Final</netty.version>
2222
</properties>
2323

2424
<dependencies>

0 commit comments

Comments
 (0)