-
Notifications
You must be signed in to change notification settings - Fork 11
/
docs.html
48 lines (47 loc) · 1.4 KB
/
docs.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
<!DOCTYPE html>
<html>
<head>
<title>Open Cloud Mesh API Reference Documentation</title>
<!-- needed for adaptive design -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<redoc></redoc>
<script>
const params = new URLSearchParams(window.location.search);
const user = params.get('user');
const repo = params.get('repo');
const branch = params.get('branch');
let changed = false;
if (user === null) {
params.set('user', 'cs3org');
changed = true;
}
if (repo === null) {
params.set('repo', 'OCM-API');
changed = true;
}
if (branch === null) {
params.set('branch', 'develop');
changed = true;
}
if (changed) {
params.sort();
window.location = `?${params.toString()}`;
}
document.querySelector('redoc').setAttribute('spec-url', `https://raw.githubusercontent.com/${user}/${repo}/${branch}/spec.yaml`);
</script>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
</body>
</html>