forked from rapi-doc/RapiDoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
109 lines (103 loc) · 3.01 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
<!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>RapiDoc</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/default.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/highlight.min.js"></script>
</head>
<body>
<!--
Some sample spec to try
https://api.apis.guru/v2/specs/stripe.com/2019-02-19/swagger.json
https://api.apis.guru/v2/specs/github.com/v3/swagger.json
https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json
https://petstore.swagger.io/v2/swagger.json
https://assets.zuora.com/zuora-documentation/swagger.yaml <<< Large spec with lot of markdown
./specs/petstore_anyof.yaml <<< contains complex one-of with inline primitives and recursive objects
./specs/oneof1.yaml <<< nested oneof
-->
<!--
<rapi-doc
id = "thedoc"
spec-url = "https://petstore.swagger.io/v2/swagger.json"
theme = "light"
render-style = "read"
schema-style = 'tree'
sort-endpoints-by = "method"
response-area-height = "900px"
> </rapi-doc>
-->
<rapi-doc
id = "thedoc"
id="thedoc"
spec-url="./specs/temp.yaml"
theme="light"
allow-api-list-style-selection = "false"
render-style = "read"
regular-font = 'Open Sans'
schema-style = 'tree'
default-schema-tab = "model"
> </rapi-doc>
<!--
<rapi-doc id = "thedoc" ></rapi-doc>
<script>
document.addEventListener('DOMContentLoaded', (event) => {
let docEl = document.getElementById("thedoc");
let strSpec = `
{
"swagger": "2.0",
"info": {
"description": "Sample to test"
},
"paths": {
"/pets": {
"get": {
"description": "Returns all pets from the system that the user has access to",
"produces": [ "application/json"],
"responses": {
"200": {
"description": "A list of pets.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Pet"
}
}
}
}
}
}
},
"definitions": {
"Pet": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
}
}
}
`;
let objSpec = JSON.parse(strSpec);
docEl.loadSpec(objSpec);
})
</script>
-->
</body>
</html>