-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
123 lines (108 loc) · 4.48 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<html>
<head>
<title>RICADO REST API Documentation</title>
<meta name="apple-mobile-web-app-title" content="RICADO" />
<meta name="application-name" content="RICADO" />
<meta name="msapplication-TileColor" content="#1b3752" />
<meta name="msapplication-TileImage" content="./images/icon/mstile-144x144.png" />
<meta name="theme-color" content="#ffffff" />
<link rel="apple-touch-icon" sizes="57x57" href="./images/icon/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="60x60" href="./images/icon/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon" sizes="72x72" href="./images/icon/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="76x76" href="./images/icon/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" sizes="114x114" href="./images/icon/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="120x120" href="./images/icon/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" sizes="144x144" href="./images/icon/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon" sizes="152x152" href="./images/icon/apple-touch-icon-152x152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="./images/icon/apple-touch-icon-180x180.png" />
<link rel="icon" type="image/png" href="./images/icon/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./images/icon/favicon-194x194.png" sizes="194x194" />
<link rel="icon" type="image/png" href="./images/icon/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="./images/icon/android-chrome-192x192.png" sizes="192x192" />
<link rel="icon" type="image/png" href="./images/icon/favicon-16x16.png" sizes="16x16" />
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@5/swagger-ui.css"/>
<style>
html
{
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after
{
box-sizing: inherit;
}
body
{
margin:0;
background: #fafafa;
}
.swagger-ui .topbar
{
background: #1B3752;
}
.swagger-ui .topbar .download-url-wrapper
{
margin-block-end: 0em;
}
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js"></script>
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-standalone-preset.js"></script>
<script>
window.onload = function ()
{
// SwaggerUI Configuration: https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md
const ui = SwaggerUIBundle({
urls: [
{url: "https://api.ricado.co.nz/api/4.0/openapi.json?rand=" + Math.random().toString(), name: "Gen 4 REST API - Production"},
{url: "https://api-staging.ricado.co.nz/api/4.0/openapi.json?rand=" + Math.random().toString(), name: "Gen 4 REST API - Staging"},
{url: "https://api.ricado.co.nz/api/3.0/openapi.json?rand=" + Math.random().toString(), name: "Gen 3 REST API - Production"},
{url: "https://api-staging.ricado.co.nz/api/3.0/openapi.json?rand=" + Math.random().toString(), name: "Gen 3 REST API - Staging"},
],
'urls.primaryName': "Gen 4 REST API - Production",
dom_id: '#swagger-ui',
deepLinking: true,
displayRequestDuration: true,
filter: true,
persistAuthorization: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
onComplete: () =>
{
const logoLink = document.querySelector('div.topbar-wrapper a.link');
if(logoLink instanceof Element)
{
const logoImage = new Image(101, 40);
logoImage.src = "./images/ricado_logo_green.svg";
logoImage.alt = "RICADO";
logoLink.replaceChildren(logoImage);
}
},
});
window.ui = ui;
setTimeout(() =>
{
const logoLink = document.querySelector('div.topbar-wrapper a.link');
if(logoLink instanceof Element)
{
const logoImage = new Image(101, 40);
logoImage.src = "./images/ricado_logo_green.svg";
logoImage.alt = "RICADO";
logoLink.replaceChildren(logoImage);
}
}, 100);
}
</script>
</body>
</html>