rapidoc 9.3.8 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +193 -61
- package/dist/rapidoc-min.js +279 -3914
- package/package.json +23 -46
- package/.babelrc.json +0 -42
- package/.eslintrc +0 -53
- package/.github/FUNDING.yml +0 -13
- package/.github/workflow/words.yaml +0 -22
- package/CONTRIBUTING.md +0 -35
- package/dist/index.html +0 -1010
- package/dist/index.html.gz +0 -0
- package/dist/rapidoc-min.js.LICENSE.txt +0 -64
- package/dist/rapidoc-min.js.LICENSE.txt.gz +0 -0
- package/dist/rapidoc-min.js.gz +0 -0
- package/dist/rapidoc-min.js.map +0 -1
- package/dist/rapidoc-min.js.map.gz +0 -0
- package/dist/rapidoc.js +0 -21603
- package/dist/report.html +0 -39
- package/index-hashroute.html +0 -65
- package/index.html +0 -1045
- package/index_bak.html +0 -251
- package/jsconfig.json +0 -11
- package/logo.png +0 -0
- package/performance.html +0 -31
- package/src/components/api-request.js +0 -1793
- package/src/components/api-response.js +0 -335
- package/src/components/dialog-box.js +0 -73
- package/src/components/json-tree.js +0 -145
- package/src/components/schema-table.js +0 -367
- package/src/components/schema-tree.js +0 -381
- package/src/components/tag-input.js +0 -135
- package/src/index.js +0 -7
- package/src/json-schema-viewer.js +0 -346
- package/src/oauth-receiver.js +0 -56
- package/src/rapidoc-mini.js +0 -382
- package/src/rapidoc.js +0 -1083
- package/src/styles/border-styles.js +0 -24
- package/src/styles/custom-styles.js +0 -10
- package/src/styles/dialog-box-styles.js +0 -75
- package/src/styles/endpoint-styles.js +0 -202
- package/src/styles/flex-styles.js +0 -15
- package/src/styles/font-styles.js +0 -268
- package/src/styles/info-styles.js +0 -21
- package/src/styles/input-styles.js +0 -207
- package/src/styles/nav-styles.js +0 -198
- package/src/styles/prism-styles.js +0 -105
- package/src/styles/schema-styles.js +0 -121
- package/src/styles/tab-styles.js +0 -47
- package/src/styles/table-styles.js +0 -58
- package/src/templates/advance-search-template.js +0 -72
- package/src/templates/callback-template.js +0 -75
- package/src/templates/code-samples-template.js +0 -34
- package/src/templates/components-template.js +0 -76
- package/src/templates/endpoint-template.js +0 -251
- package/src/templates/expanded-endpoint-template.js +0 -199
- package/src/templates/focused-endpoint-template.js +0 -110
- package/src/templates/header-template.js +0 -66
- package/src/templates/json-schema-viewer-template.js +0 -185
- package/src/templates/logo-template.js +0 -18
- package/src/templates/main-body-template.js +0 -110
- package/src/templates/navbar-template.js +0 -272
- package/src/templates/overview-template.js +0 -79
- package/src/templates/security-scheme-template.js +0 -612
- package/src/templates/server-template.js +0 -115
- package/src/utils/color-utils.js +0 -59
- package/src/utils/common-utils.js +0 -168
- package/src/utils/schema-utils.js +0 -1086
- package/src/utils/spec-parser.js +0 -462
- package/src/utils/theme.js +0 -288
- package/webpack.config.js +0 -142
package/index_bak.html
DELETED
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
7
|
-
<title>RapiDoc</title>
|
|
8
|
-
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/default.min.css">
|
|
9
|
-
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/highlight.min.js"></script>
|
|
10
|
-
</head>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
window.addEventListener('DOMContentLoaded', (event) => {
|
|
14
|
-
const docEl = document.getElementById('thedoc');
|
|
15
|
-
docEl.addEventListener('before-try', (e) => {
|
|
16
|
-
e.detail.request.headers.append('AAA-BBB', 'CCC DDDD');
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<body>
|
|
22
|
-
<!--
|
|
23
|
-
Some sample spec to try
|
|
24
|
-
https://api.apis.guru/v2/specs/stripe.com/2019-02-19/swagger.json
|
|
25
|
-
https://api.apis.guru/v2/specs/github.com/v3/swagger.json
|
|
26
|
-
https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json
|
|
27
|
-
https://petstore.swagger.io/v2/swagger.json
|
|
28
|
-
https://assets.zuora.com/zuora-documentation/swagger.yaml <<< Large spec with lot of markdown
|
|
29
|
-
./specs/petstore_anyof.yaml <<< contains complex one-of with inline primitives and recursive objects
|
|
30
|
-
./specs/oneof1.yaml <<< nested oneof
|
|
31
|
-
https://cesdev.eng.sonicwall.com/api/q/openapi
|
|
32
|
-
-->
|
|
33
|
-
<rapi-doc
|
|
34
|
-
spec-url = "./specs/temp.yaml"
|
|
35
|
-
id="thedoc"
|
|
36
|
-
theme = "dark"
|
|
37
|
-
render-style="focused"
|
|
38
|
-
schema-style="tree"
|
|
39
|
-
show-method-in-nav-bar = "true"
|
|
40
|
-
use-path-in-nav-bar = "true"
|
|
41
|
-
show-components = "true"
|
|
42
|
-
show-info = "true"
|
|
43
|
-
show-header = "true"
|
|
44
|
-
allow-search = "true"
|
|
45
|
-
allow-advanced-search = "true"
|
|
46
|
-
allow-spec-url-load="false"
|
|
47
|
-
allow-spec-file-download="true"
|
|
48
|
-
allow-server-selection = "true"
|
|
49
|
-
allow-authentication = "true"
|
|
50
|
-
update-route="false"
|
|
51
|
-
remove-endpoints-with-badge-label-as="one"
|
|
52
|
-
match-type="regex"
|
|
53
|
-
persist-auth="true"
|
|
54
|
-
scroll-behavior="smooth"
|
|
55
|
-
allow-try = "false"
|
|
56
|
-
show-curl-before-try = "true"
|
|
57
|
-
></rapi-doc>
|
|
58
|
-
<!--
|
|
59
|
-
<rapi-doc-mini
|
|
60
|
-
style= "width:600px; padding:0 10px"
|
|
61
|
-
id = "thedoc"
|
|
62
|
-
spec-url="./specs/code-highlight.yaml"
|
|
63
|
-
theme = "light"
|
|
64
|
-
schema-style = 'table'
|
|
65
|
-
sort-endpoints-by = "method"
|
|
66
|
-
layout = "column"
|
|
67
|
-
match-paths = "post /code"
|
|
68
|
-
paths-expanded = "true"
|
|
69
|
-
> </rapi-doc-mini>
|
|
70
|
-
<br/>
|
|
71
|
-
<rapi-doc-mini
|
|
72
|
-
style= "width:600px; padding:0 10px"
|
|
73
|
-
id = "thedoc"
|
|
74
|
-
spec-url="./specs/code-highlight.yaml"
|
|
75
|
-
theme = "light"
|
|
76
|
-
schema-style = 'table'
|
|
77
|
-
sort-endpoints-by = "method"
|
|
78
|
-
layout = "column"
|
|
79
|
-
match-paths = "get /code"
|
|
80
|
-
> </rapi-doc-mini>
|
|
81
|
-
-->
|
|
82
|
-
|
|
83
|
-
<!--
|
|
84
|
-
|
|
85
|
-
<rapi-doc
|
|
86
|
-
id = "thedoc"
|
|
87
|
-
spec-url="./specs/code-highlight.yaml"
|
|
88
|
-
theme = "light"
|
|
89
|
-
render-style = "view"
|
|
90
|
-
schema-style = 'tree'
|
|
91
|
-
sort-endpoints-by = "method"
|
|
92
|
-
show-info = "false"
|
|
93
|
-
show-header = "false"
|
|
94
|
-
allow-server-selection = "false"
|
|
95
|
-
allow-authentication = "false"
|
|
96
|
-
> </rapi-doc>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<rapi-doc
|
|
100
|
-
id = "thedoc"
|
|
101
|
-
spec-url="https://petstore.swagger.io/v2/swagger.json1"
|
|
102
|
-
render-style = "read"
|
|
103
|
-
load-fonts = "false"
|
|
104
|
-
show-header = "false"
|
|
105
|
-
>
|
|
106
|
-
<div slot="nav-logo" style="width:100%; display: flex;justify-content: center;">
|
|
107
|
-
<button class='btn medium' onclick="document.getElementById('thedoc').setAttribute('schema-style', 'table')" >Table</button>
|
|
108
|
-
<button class='btn medium' onclick="document.getElementById('thedoc').setAttribute('schema-style', 'tree')" >Tree</button>
|
|
109
|
-
</div>
|
|
110
|
-
<div slot="put-/pet" style="width:100%; display: flex;justify-content: center;">
|
|
111
|
-
<b style="color:red"> Hello world</b>
|
|
112
|
-
</div>
|
|
113
|
-
</rapi-doc>
|
|
114
|
-
-->
|
|
115
|
-
<!--
|
|
116
|
-
<rapi-doc id = "thedoc" ></rapi-doc>
|
|
117
|
-
<script>
|
|
118
|
-
document.addEventListener('DOMContentLoaded', (event) => {
|
|
119
|
-
let docEl = document.getElementById("thedoc");
|
|
120
|
-
let strSpec = `
|
|
121
|
-
{
|
|
122
|
-
"openapi": "3.0.1",
|
|
123
|
-
"info": {
|
|
124
|
-
"title": "My API",
|
|
125
|
-
"version": "v1"
|
|
126
|
-
},
|
|
127
|
-
"paths": {
|
|
128
|
-
"/api/Todo/complicated": {
|
|
129
|
-
"get": {
|
|
130
|
-
"tags": [
|
|
131
|
-
"Todo"
|
|
132
|
-
],
|
|
133
|
-
"summary": "Complicated action.",
|
|
134
|
-
"responses": {
|
|
135
|
-
"200": {
|
|
136
|
-
"description": "Returns a complicated class.",
|
|
137
|
-
"content": {
|
|
138
|
-
"application/json": {
|
|
139
|
-
"schema": {
|
|
140
|
-
"$ref": "#/components/schemas/ComplicatedClass"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
"components": {
|
|
150
|
-
"schemas": {
|
|
151
|
-
"Tag": {
|
|
152
|
-
"enum": [
|
|
153
|
-
0,
|
|
154
|
-
1,
|
|
155
|
-
2
|
|
156
|
-
],
|
|
157
|
-
"type": "integer",
|
|
158
|
-
"description": "Tag for TodoItem.",
|
|
159
|
-
"format": "int32"
|
|
160
|
-
},
|
|
161
|
-
"InnerEnum": {
|
|
162
|
-
"enum": [
|
|
163
|
-
1
|
|
164
|
-
],
|
|
165
|
-
"type": "integer",
|
|
166
|
-
"description": "Inner enum.",
|
|
167
|
-
"format": "int32"
|
|
168
|
-
},
|
|
169
|
-
"SecondInnerEnum": {
|
|
170
|
-
"enum": [
|
|
171
|
-
0
|
|
172
|
-
],
|
|
173
|
-
"type": "integer",
|
|
174
|
-
"description": "Second inner enum.",
|
|
175
|
-
"format": "int32"
|
|
176
|
-
},
|
|
177
|
-
"SecondInnerEnumSecondInnerClass": {
|
|
178
|
-
"type": "object",
|
|
179
|
-
"properties": {
|
|
180
|
-
"innerEnum": {
|
|
181
|
-
"allOf": [
|
|
182
|
-
{
|
|
183
|
-
"$ref": "#/components/schemas/SecondInnerEnum"
|
|
184
|
-
}
|
|
185
|
-
],
|
|
186
|
-
"description": "Second inner enum."
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
"additionalProperties": false,
|
|
190
|
-
"description": "Second inner class."
|
|
191
|
-
},
|
|
192
|
-
"InnerClass": {
|
|
193
|
-
"type": "object",
|
|
194
|
-
"properties": {
|
|
195
|
-
"innerEnum": {
|
|
196
|
-
"type": "array",
|
|
197
|
-
"items": {
|
|
198
|
-
"$ref": "#/components/schemas/InnerEnum"
|
|
199
|
-
},
|
|
200
|
-
"description": "List of inner enums.",
|
|
201
|
-
"nullable": true
|
|
202
|
-
},
|
|
203
|
-
"secondInnerClass": {
|
|
204
|
-
"allOf": [
|
|
205
|
-
{
|
|
206
|
-
"$ref": "#/components/schemas/SecondInnerEnumSecondInnerClass"
|
|
207
|
-
}
|
|
208
|
-
],
|
|
209
|
-
"description": "Second inner class.",
|
|
210
|
-
"nullable": true
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
"additionalProperties": false,
|
|
214
|
-
"description": "Inner class."
|
|
215
|
-
},
|
|
216
|
-
"ComplicatedClass": {
|
|
217
|
-
"type": "object",
|
|
218
|
-
"properties": {
|
|
219
|
-
"tag": {
|
|
220
|
-
"allOf": [
|
|
221
|
-
{
|
|
222
|
-
"$ref": "#/components/schemas/Tag"
|
|
223
|
-
}
|
|
224
|
-
],
|
|
225
|
-
"description": "Tag."
|
|
226
|
-
},
|
|
227
|
-
"innerClass": {
|
|
228
|
-
"allOf": [
|
|
229
|
-
{
|
|
230
|
-
"$ref": "#/components/schemas/InnerClass"
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
|
-
"description": "Inner class.",
|
|
234
|
-
"nullable": true
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
"additionalProperties": false,
|
|
238
|
-
"description": "Complicated class for testing enums."
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
`;
|
|
244
|
-
let objSpec = JSON.parse(strSpec);
|
|
245
|
-
docEl.loadSpec(objSpec);
|
|
246
|
-
})
|
|
247
|
-
</script>
|
|
248
|
-
-->
|
|
249
|
-
</body>
|
|
250
|
-
|
|
251
|
-
</html>
|
package/jsconfig.json
DELETED
package/logo.png
DELETED
|
Binary file
|
package/performance.html
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
7
|
-
<title>RapiDoc</title>
|
|
8
|
-
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,600&display=swap" rel="stylesheet">
|
|
9
|
-
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/default.min.css">
|
|
10
|
-
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/highlight.min.js"></script>
|
|
11
|
-
</head>
|
|
12
|
-
|
|
13
|
-
<body>
|
|
14
|
-
<rapi-doc
|
|
15
|
-
id = "thedoc"
|
|
16
|
-
spec-url="./specs/examples.yaml"
|
|
17
|
-
allow-server-selection = "false"
|
|
18
|
-
show-header = "false"
|
|
19
|
-
show-info = "false"
|
|
20
|
-
theme = "light"
|
|
21
|
-
allow-try = "true"
|
|
22
|
-
sort-endpoints-by = "summary"
|
|
23
|
-
allow-api-list-style-selection = "false"
|
|
24
|
-
regular-font = 'Open Sans'
|
|
25
|
-
schema-style = 'tree'
|
|
26
|
-
render-style = 'read'
|
|
27
|
-
default-schema-tab = "model"
|
|
28
|
-
>
|
|
29
|
-
</rapi-doc>
|
|
30
|
-
</body>
|
|
31
|
-
</html>
|