-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
54 lines (51 loc) · 1.92 KB
/
index.html
File metadata and controls
54 lines (51 loc) · 1.92 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>DDBapi | Documentation of the Application Programming Interface
(API)</title>
<!-- Use relative paths so the app works under a subpath (e.g. /app/ddbapi/) -->
<base href="./">
<link rel="stylesheet" type="text/css" href="swagger-ui/swagger-ui.css">
<style>
html { box-sizing: border-box; overflow: -moz-scrollbars-vertical; }
*, *:before, *:after { box-sizing: inherit; }
body { margin:0; background: #fafafa; }
</style>
</head>
<body>
<!-- control bar is injected into Swagger UI via plugin -->
<div id="swagger-ui"></div>
<script src="swagger-ui/swagger-ui-bundle.js"></script>
<script src="swagger-ui/swagger-ui-standalone-preset.js"></script>
<script src="scripts/ddb-plugins.js"></script>
<script>
(function () {
const apiUrl = window.computeInitialApiUrl();
// Initialize as soon as DOM is ready (faster than window.onload)
document.addEventListener('DOMContentLoaded', () => {
try {
const ui = SwaggerUIBundle({
url: apiUrl,
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
layout: 'StandaloneLayout',
plugins: [window.ApiSelectorPlugin],
// security / privacy: disable the external validator service
validatorUrl: null,
// enable deep linking for direct links to operations
deepLinking: true
});
window.ui = ui;
} catch (err) {
console.error('Failed to initialize Swagger UI', err);
}
});
})();
</script>
</body>
</html>