Skip to content

Commit dae5fd2

Browse files
committed
Update to swagger-ui 3.46.0
1 parent eacb70f commit dae5fd2

File tree

14 files changed

+37
-33
lines changed

14 files changed

+37
-33
lines changed

servant-swagger-ui/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
- 0.3.4.46.0
2+
- Update to `swagger-ui-3.46.0`
3+
14
- 0.3.4.3.37.2
25
- Update to `swagger-ui-3.37.2`
36
- Add `swaggerSchemaUIServerT` and `swaggerSchemaUIServerT'`

servant-swagger-ui/index.html.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<title>Swagger UI</title>
7-
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
7+
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
88
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
99
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
1010
<!-- Script to reload .../swagger-ui to .../swagger-ui/ -->
@@ -70,11 +70,11 @@
7070
SwaggerUIBundle.plugins.DownloadUrl
7171
],
7272
layout: "StandaloneLayout"
73-
})
73+
});
7474
// End Swagger UI call region
7575

76-
window.ui = ui
77-
}
76+
window.ui = ui;
77+
};
7878
</script>
7979
</body>
8080
</html>

servant-swagger-ui/servant-swagger-ui.cabal

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 1.12
22
name: servant-swagger-ui
3-
version: 0.3.4.3.37.2
3+
version: 0.3.4.3.46.0
44
synopsis: Servant swagger ui
55
category: Web, Servant, Swagger
66
description:
@@ -27,13 +27,13 @@ tested-with:
2727
extra-source-files:
2828
CHANGELOG.md
2929
index.html.tmpl
30-
swagger-ui-dist-3.37.2/favicon-16x16.png
31-
swagger-ui-dist-3.37.2/favicon-32x32.png
32-
swagger-ui-dist-3.37.2/oauth2-redirect.html
33-
swagger-ui-dist-3.37.2/swagger-ui-bundle.js
34-
swagger-ui-dist-3.37.2/swagger-ui-standalone-preset.js
35-
swagger-ui-dist-3.37.2/swagger-ui.css
36-
swagger-ui-dist-3.37.2/swagger-ui.js
30+
swagger-ui-dist-3.46.0/favicon-16x16.png
31+
swagger-ui-dist-3.46.0/favicon-32x32.png
32+
swagger-ui-dist-3.46.0/oauth2-redirect.html
33+
swagger-ui-dist-3.46.0/swagger-ui-bundle.js
34+
swagger-ui-dist-3.46.0/swagger-ui-standalone-preset.js
35+
swagger-ui-dist-3.46.0/swagger-ui.css
36+
swagger-ui-dist-3.46.0/swagger-ui.js
3737

3838
source-repository head
3939
type: git

servant-swagger-ui/src/Servant/Swagger/UI.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ swaggerUiIndexTemplate :: Text
116116
swaggerUiIndexTemplate = $(embedText "index.html.tmpl")
117117

118118
swaggerUiFiles :: [(FilePath, ByteString)]
119-
swaggerUiFiles = $(embedRecursiveDir "swagger-ui-dist-3.37.2")
119+
swaggerUiFiles = $(embedRecursiveDir "swagger-ui-dist-3.46.0")

servant-swagger-ui/swagger-ui-dist-3.37.2/swagger-ui-bundle.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

servant-swagger-ui/swagger-ui-dist-3.37.2/swagger-ui-standalone-preset.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

servant-swagger-ui/swagger-ui-dist-3.37.2/swagger-ui.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

servant-swagger-ui/swagger-ui-dist-3.37.2/oauth2-redirect.html renamed to servant-swagger-ui/swagger-ui-dist-3.46.0/oauth2-redirect.html

Lines changed: 11 additions & 10 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 () {
@@ -20,19 +18,20 @@
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({
@@ -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. ") +
@@ -72,3 +71,5 @@
7271
run();
7372
});
7473
</script>
74+
</body>
75+
</html>

0 commit comments

Comments
 (0)