This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
83 lines (73 loc) · 2.49 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/[email protected]/swagger-ui.css">
<link rel="stylesheet" type="text/css" href="./apps/web/src/styles/theme-feeling-blue.css">
<link rel="stylesheet" type="text/css" href="./apps/web/src/styles/product.css">
<link rel="stylesheet" type="text/css" href="./apps/web/src/styles/globals.css">
<style>
html {
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
background: #fafafa;
}
</style>
<script type="importmap">
{
"imports": {
"react": "https://unpkg.com/@esm-bundle/react/esm/react.production.min.js",
"react/jsx-runtime": "./react-jsx-runtime.js",
"@dsaidgovsg/swagger-ui-custom-layout": "/packages/swagger-ui-custom-layout/dist/index.mjs",
"@dsaidgovsg/swagger-ui-plugin-otp-auth": "/packages/swagger-ui-plugin-otp-auth/dist/index.mjs",
"@dsaidgovsg/swagger-ui-plugin-saml-auth": "/packages/swagger-ui-plugin-saml-auth/dist/index.mjs",
"@dsaidgovsg/chain-wrap-components": "/packages/chain-wrap-components/dist/index.mjs"
}
}
</script>
<script crossorigin src="https://unpkg.com/[email protected]/swagger-ui-bundle.js"> </script>
<script type="module">
import productLayoutPlugin from "@dsaidgovsg/swagger-ui-custom-layout";
import otpJwtAuthPlugin from '@dsaidgovsg/swagger-ui-plugin-otp-auth';
import samlAuthPlugin from '@dsaidgovsg/swagger-ui-plugin-saml-auth';
import chainWrapComponents from '@dsaidgovsg/chain-wrap-components';
window.onload = function () {
// Build a system
const ui = SwaggerUIBundle({
url: "./apps/web/public/swagger.yaml",
dom_id: '#swagger-ui',
plugins: [
productLayoutPlugin,
chainWrapComponents(
otpJwtAuthPlugin,
samlAuthPlugin
)
],
pluginsOptions: {
pluginLoadType: 'chain'
},
layout: "ProductLayout",
docExpansion: "none",
displayRequestDuration: true,
validatorUrl: null
})
window.ui = ui
}
</script>
</head>
<body>
<div id="swagger-ui"></div>
</body>
</html>