-
Notifications
You must be signed in to change notification settings - Fork 1
/
pact.html
50 lines (48 loc) · 1.56 KB
/
pact.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
<!DOCTYPE html>
<html>
<head>
<title>Pact API</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<style type="text/css">
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="redoc"></div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script>
<script type="text/javascript">
fetch('./pact.openapi.yaml')
.then(res => res.text())
.then(res => jsyaml.load(res))
.then(spec => {
// spec.info['x-logo'] = { url: "link/to/image.png" };
Redoc.init(spec, {
// nativeScrollbars: true,
pathInMiddlePanel: true,
theme: {
colors: {
primary: {
main: 'RGB(218,52,140)' // Kadena pink
// main: 'RGB(96,24,145)' // K purple
}
}
},
expandResponses: "200,201,204",
// not available for CE version
showConsole: true,
generateCodeSamples: {
languages: [
{ lang: 'curl' },
{ lang: 'Javascript' }
]
}
}, document.getElementById('redoc'));
});
</script>
</body>
</html>