Skip to content

Commit ab3f11b

Browse files
authored
Updating swagger-ui version to 5.29.0
1 parent 2e4cb75 commit ab3f11b

File tree

12 files changed

+58
-80
lines changed

12 files changed

+58
-80
lines changed

README.md

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

1212
## Acknowledgement ##
1313

14-
* [Swagger UI](https://github.com/swagger-api/swagger-ui) version used for this library is [v3.44.0](https://github.com/swagger-api/swagger-ui/releases/tag/v3.44.0) under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).
14+
* [Swagger UI](https://github.com/swagger-api/swagger-ui) version used for this library is [v5.29.0](https://github.com/swagger-api/swagger-ui/releases/tag/v5.29.0) under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).
1515
* This extension supports the OpenAPI spec version of [v2.0](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md) and [v3.0.1](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.1.md).
1616

1717

docs/openapi-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This enables Azure Functions to render OpenAPI document and Swagger UI. The more
99

1010
## Acknowledgement ##
1111

12-
* [Swagger UI](https://github.com/swagger-api/swagger-ui) version used for this library is [v3.44.0](https://github.com/swagger-api/swagger-ui/releases/tag/v3.44.0) under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).
12+
* [Swagger UI](https://github.com/swagger-api/swagger-ui) version used for this library is [v5.29.0](https://github.com/swagger-api/swagger-ui/releases/tag/v5.29.0) under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).
1313

1414

1515
## Issues? ##

docs/openapi-in-proc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Please find this document, [Microsoft.Azure.Functions.Worker.Extensions.OpenApi]
1515

1616
## Acknowledgement ##
1717

18-
* [Swagger UI](https://github.com/swagger-api/swagger-ui) version used for this library is [v3.44.0](https://github.com/swagger-api/swagger-ui/releases/tag/v3.44.0) under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).
18+
* [Swagger UI](https://github.com/swagger-api/swagger-ui) version used for this library is [v5.29.0](https://github.com/swagger-api/swagger-ui/releases/tag/v5.29.0) under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).
1919

2020

2121
## Issues? ##

docs/openapi-out-of-proc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This enables Azure Functions to render OpenAPI document and Swagger UI. Unlike t
99

1010
## Acknowledgement ##
1111

12-
* [Swagger UI](https://github.com/swagger-api/swagger-ui) version used for this library is [v3.44.0](https://github.com/swagger-api/swagger-ui/releases/tag/v3.44.0) under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).
12+
* [Swagger UI](https://github.com/swagger-api/swagger-ui) version used for this library is [v5.29.0](https://github.com/swagger-api/swagger-ui/releases/tag/v5.29.0) under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).
1313

1414

1515
## Issues? ##

src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/dist/oauth2-redirect.html

Lines changed: 46 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,70 +6,53 @@
66
<body>
77
<script>
88
'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);
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 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-
window.addEventListener('DOMContentLoaded', function () {
71-
run();
9+
function run() {
10+
var e, r, t, a = window.opener.swaggerUIRedirectOauth2, o = a.state, n = a.redirectUrl;
11+
if ((t = (r = /code|token|error/.test(window.location.hash) ? window.location.hash.substring(1).replace("?", "&") : location.search.substring(1)).split("&")).forEach((function(e, r, t) {
12+
t[r] = '"' + e.replace("=", '":"') + '"'
13+
}
14+
)),
15+
e = (r = r ? JSON.parse("{" + t.join() + "}", (function(e, r) {
16+
return "" === e ? r : decodeURIComponent(r)
17+
}
18+
)) : {}).state === o,
19+
"accessCode" !== a.auth.schema.get("flow") && "authorizationCode" !== a.auth.schema.get("flow") && "authorization_code" !== a.auth.schema.get("flow") || a.auth.code)
20+
a.callback({
21+
auth: a.auth,
22+
token: r,
23+
isValid: e,
24+
redirectUrl: n
7225
});
26+
else if (e || a.errCb({
27+
authId: a.auth.name,
28+
source: "auth",
29+
level: "warning",
30+
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
31+
}),
32+
r.code)
33+
delete a.state,
34+
a.auth.code = r.code,
35+
a.callback({
36+
auth: a.auth,
37+
redirectUrl: n
38+
});
39+
else {
40+
let e;
41+
r.error && (e = "[" + r.error + "]: " + (r.error_description ? r.error_description + ". " : "no accessCode received from the server. ") + (r.error_uri ? "More info: " + r.error_uri : "")),
42+
a.errCb({
43+
authId: a.auth.name,
44+
source: "auth",
45+
level: "error",
46+
message: e || "[Authorization failed]: no accessCode received from the server"
47+
})
48+
}
49+
window.close()
50+
}
51+
"loading" !== document.readyState ? run() : document.addEventListener("DOMContentLoaded", (function() {
52+
run()
53+
}
54+
));
55+
7356
</script>
7457
</body>
7558
</html>

src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/dist/swagger-ui-bundle.js

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

src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/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.

src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/dist/swagger-ui-es-bundle.js

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

src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/dist/swagger-ui-standalone-preset.js

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

src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/dist/swagger-ui.css

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

0 commit comments

Comments
 (0)