-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
66 lines (57 loc) · 2.12 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"> -->
<title>Pazemo API</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,600&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://raw.githubusercontent.com/Pazemo/docs/main/source/images/favicon.ico"/>
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/default.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
</head>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
const docEl = document.getElementById('thedoc');
docEl.addEventListener('before-try', (e) => {
e.detail.request.headers.append('AAA-BBB', 'CCC DDDD');
});
});
</script>
<body>
<rapi-doc
id = "thedoc"
spec-url="https://api.stg.pazemo.com/openapi.json"
allow-server-selection = "true"
show-header = "false"
show-info = "false"
theme = "light"
primary-color = "#43c7e2"
allow-try = "true"
sort-endpoints-by = "summary"
allow-api-list-style-selection = "false"
load-fonts ="true"
font-size ="large"
regular-font = 'Open Sans'
schema-style = 'tree'
render-style = 'read'
default-schema-tab = "model"
fetch-credentials = "same-origin"
sort-tags = "true"
>
<div slot="nav-logo" style="display: flex; align-items: center; justify-content: center;">
<img src="https://raw.githubusercontent.com/Pazemo/docs/main/source/images/logo.png" style="width:100px; margin-right: 5px"> <span style="color:#00bfff"> <b>API</b></span>
</div>
</rapi-doc>
<script>
document.addEventListener('DOMContentLoaded', (event) => {
let docEl = document.getElementById("thedoc");
docEl.addEventListener('before-render', (e) => {
e.detail.spec.info.description = "Pazemo API` event";
});
docEl.addEventListener('after-try', (e) => {
console.log(e.detail);
});
})
</script>
</body>
</html>