Skip to content

Commit 69f8de6

Browse files
authored
Merge pull request #103 from telser/update-swagger-ui-4.14
Update to swagger-ui to 4.14.0
2 parents d4533c5 + 029f901 commit 69f8de6

25 files changed

+52
-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.5.4.14.0
2+
- Update to `swagger-ui-4.14.0`
3+
14
- 0.3.5.3.47.1
25
- Update to `swagger-ui-3.47.1`
36
- Generalize `swaggerSchemaUIServer` to support arbitrary `Value` instead of hardcoded `Swagger`

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

Lines changed: 17 additions & 12 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.5.4.5.0
3+
version: 0.3.5.4.14.0
44
synopsis: Servant swagger ui
55
category: Web, Servant, Swagger
66
description:
@@ -27,17 +27,22 @@ tested-with:
2727
extra-source-files:
2828
CHANGELOG.md
2929
index.html.tmpl
30-
swagger-ui-dist-4.5.0/favicon-16x16.png
31-
swagger-ui-dist-4.5.0/favicon-32x32.png
32-
swagger-ui-dist-4.5.0/oauth2-redirect.html
33-
swagger-ui-dist-4.5.0/swagger-ui-bundle.js
34-
swagger-ui-dist-4.5.0/swagger-ui-bundle.js.map
35-
swagger-ui-dist-4.5.0/swagger-ui-standalone-preset.js
36-
swagger-ui-dist-4.5.0/swagger-ui-standalone-preset.js.map
37-
swagger-ui-dist-4.5.0/swagger-ui.css
38-
swagger-ui-dist-4.5.0/swagger-ui.css.map
39-
swagger-ui-dist-4.5.0/swagger-ui.js
40-
swagger-ui-dist-4.5.0/swagger-ui.js.map
30+
swagger-ui-dist-4.14.0/favicon-16x16.png
31+
swagger-ui-dist-4.14.0/favicon-32x32.png
32+
swagger-ui-dist-4.14.0/oauth2-redirect.html
33+
swagger-ui-dist-4.14.0/swagger-ui-bundle.js
34+
swagger-ui-dist-4.14.0/swagger-ui-bundle.js.map
35+
swagger-ui-dist-4.14.0/swagger-ui-es-bundle-core.js
36+
swagger-ui-dist-4.14.0/swagger-ui-es-bundle-core.js.map
37+
swagger-ui-dist-4.14.0/swagger-ui-es-bundle.js
38+
swagger-ui-dist-4.14.0/swagger-ui-es-bundle.js.map
39+
swagger-ui-dist-4.14.0/swagger-ui-standalone-preset.js
40+
swagger-ui-dist-4.14.0/swagger-ui-standalone-preset.js.map
41+
swagger-ui-dist-4.14.0/swagger-ui.css
42+
swagger-ui-dist-4.14.0/swagger-ui.css.map
43+
swagger-ui-dist-4.14.0/swagger-ui.js
44+
swagger-ui-dist-4.14.0/swagger-ui.js.map
45+
swagger-ui-dist-4.14.0/favicon-16x16.png
4146

4247
source-repository head
4348
type: git

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

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

125125
swaggerUiFiles :: [(FilePath, ByteString)]
126-
swaggerUiFiles = $(embedRecursiveDir "swagger-ui-dist-4.5.0")
126+
swaggerUiFiles = $(embedRecursiveDir "swagger-ui-dist-4.14.0")

servant-swagger-ui/swagger-ui-dist-4.5.0/oauth2-redirect.html renamed to servant-swagger-ui/swagger-ui-dist-4.14.0/oauth2-redirect.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
var isValid, qp, arr;
1414

1515
if (/code|token|error/.test(window.location.hash)) {
16-
qp = window.location.hash.substring(1);
16+
qp = window.location.hash.substring(1).replace('?', '&');
1717
} else {
1818
qp = location.search.substring(1);
1919
}
@@ -38,7 +38,7 @@
3838
authId: oauth2.auth.name,
3939
source: "auth",
4040
level: "warning",
41-
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."
4242
});
4343
}
4444

@@ -58,7 +58,7 @@
5858
authId: oauth2.auth.name,
5959
source: "auth",
6060
level: "error",
61-
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
61+
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
6262
});
6363
}
6464
} else {
@@ -67,9 +67,13 @@
6767
window.close();
6868
}
6969

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

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

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

servant-swagger-ui/swagger-ui-dist-4.14.0/swagger-ui-bundle.js.map

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

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

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

servant-swagger-ui/swagger-ui-dist-4.14.0/swagger-ui-es-bundle-core.js.map

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

0 commit comments

Comments
 (0)