rapidoc 9.1.3 → 9.1.4
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/dist/index.html +1 -1
- package/dist/index.html.gz +0 -0
- package/dist/rapidoc-min.js +2 -2
- package/dist/rapidoc-min.js.LICENSE.txt +17 -1
- package/dist/rapidoc-min.js.LICENSE.txt.gz +0 -0
- package/dist/rapidoc-min.js.gz +0 -0
- package/dist/report.html +6 -5
- package/docker/Dockerfile +5 -5
- package/docs/api.html +12 -5
- package/docs/examples/dynamic-query-params.html +1 -0
- package/docs/examples/readwrite.html +40 -0
- package/docs/examples.html +3 -2
- package/docs/index.html +2 -2
- package/docs/list.html +6 -2
- package/docs/quickstart.html +1 -1
- package/docs/rapidoc-min.js +2 -2
- package/docs/specs/code-highlight.yaml +1 -1
- package/docs/specs/data-types.yaml +0 -1
- package/docs/specs/examples.yaml +11 -0
- package/docs/specs/petstore_extended.yaml +1 -1
- package/docs/specs/readwrite.yaml +90 -0
- package/docs/specs/temp.json +24 -105
- package/docs/specs/temp.yaml +20 -282
- package/docs/welcome.html +3 -3
- package/index.html +8 -5
- package/package.json +22 -21
- package/src/components/api-request.js +78 -41
- package/src/components/api-response.js +10 -10
- package/src/components/schema-table.js +51 -14
- package/src/components/schema-tree.js +59 -18
- package/src/components/tag-input.js +8 -1
- package/src/json-schema-viewer.js +1 -1
- package/src/rapidoc-mini.js +5 -1
- package/src/rapidoc.js +5 -1
- package/src/styles/font-styles.js +3 -2
- package/src/styles/nav-styles.js +2 -2
- package/src/templates/components-template.js +5 -5
- package/src/templates/endpoint-template.js +1 -1
- package/src/templates/expanded-endpoint-template.js +1 -1
- package/src/templates/focused-endpoint-template.js +1 -1
- package/src/templates/header-template.js +1 -1
- package/src/templates/json-schema-viewer-template.js +8 -8
- package/src/templates/main-body-template.js +4 -1
- package/src/templates/navbar-template.js +2 -2
- package/src/templates/overview-template.js +5 -2
- package/src/templates/security-scheme-template.js +48 -13
- package/src/templates/server-template.js +1 -1
- package/src/utils/common-utils.js +2 -1
- package/src/utils/schema-utils.js +14 -9
- package/src/utils/spec-parser.js +3 -3
- package/webpack.config.js +1 -0
- package/docs/specs/tenants.json +0 -12
package/docker/Dockerfile
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# to Build the Docker image from root folder execute
|
|
2
|
+
# docker build -t mrin9/rapidoc -f ./docker/Dockerfile .
|
|
3
|
+
|
|
1
4
|
# Run the Docker image (view a spec thats hosted on a web-server)
|
|
2
5
|
# docker run -it --rm -p 80:80 -e SPEC_URL="http://petstore.swagger.io/v2/swagger.json" mrin9/rapidoc
|
|
3
6
|
|
|
@@ -30,17 +33,14 @@ RUN npm run build
|
|
|
30
33
|
|
|
31
34
|
# production stage
|
|
32
35
|
FROM nginx:stable-alpine as production-stage
|
|
33
|
-
COPY --from=build-stage /app/dist /app
|
|
34
|
-
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
|
35
36
|
|
|
36
37
|
ENV PAGE_TITLE="RapiDoc"
|
|
37
38
|
ENV PAGE_FAVICON="favicon.png"
|
|
38
39
|
ENV SPEC_URL="http://petstore.swagger.io/v2/swagger.json"
|
|
39
40
|
ENV PORT=80
|
|
40
|
-
ENV RAPIDOC_OPTIONS=
|
|
41
41
|
|
|
42
42
|
# copy files to the nginx folder
|
|
43
|
-
COPY --from=
|
|
43
|
+
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
44
44
|
COPY docker/index.tpl.html /usr/share/nginx/html/index.html
|
|
45
45
|
COPY logo.png /usr/share/nginx/html/favicon.png
|
|
46
46
|
COPY docker/nginx.conf /etc/nginx/
|
|
@@ -48,4 +48,4 @@ COPY docker/docker-run.sh /usr/local/bin
|
|
|
48
48
|
|
|
49
49
|
EXPOSE 80
|
|
50
50
|
|
|
51
|
-
CMD ["sh", "/usr/local/bin/docker-run.sh"]
|
|
51
|
+
CMD ["sh", "/usr/local/bin/docker-run.sh"]
|
package/docs/api.html
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
<meta charset="utf-8">
|
|
16
16
|
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
17
|
-
<meta name="description" content="RapiDoc is Web Component for viewing Swagger & OpenAPI Spec. Supports themes, styling and various rendering styles">
|
|
18
|
-
<meta name="keywords" content="RapiDoc, ReDoc, Swagger, SwaggerUI, Custom Element, Web Component, OpenAPI,REST, themes, dark mode, markdown, API documentation">
|
|
17
|
+
<meta name="description" content="RapiDoc is a Web Component for viewing Swagger & OpenAPI Spec. Supports themes, styling and various rendering styles">
|
|
18
|
+
<meta name="keywords" content="RapiDoc, openapi viewer, openapi to html, openapi renderer, ReDoc, Swagger, SwaggerUI, Custom Element, Web Component, OpenAPI, REST, themes, dark mode, markdown, API documentation">
|
|
19
19
|
|
|
20
20
|
<link rel="shortcut icon" type="image/png" href="./images/logo.png"/>
|
|
21
21
|
|
|
@@ -147,6 +147,13 @@
|
|
|
147
147
|
</span> Request fields will be filled with example value (if provided in spec) </td>
|
|
148
148
|
<td class='default-col'>true</td>
|
|
149
149
|
</tr>
|
|
150
|
+
|
|
151
|
+
<tr>
|
|
152
|
+
<td class="attr-col mono bold right">persist-auth </td>
|
|
153
|
+
<td class="gray"><span class='bold dark-gray'>Allowed:<span class='blue'> true | false </span>
|
|
154
|
+
</span> Authentication will be persisted to localStorage </td>
|
|
155
|
+
<td class='default-col'>false</td>
|
|
156
|
+
</tr>
|
|
150
157
|
</table>
|
|
151
158
|
|
|
152
159
|
<a id="att-colors"></a>
|
|
@@ -352,7 +359,7 @@
|
|
|
352
359
|
<tr>
|
|
353
360
|
<td class="mono bold right">schema-hide-read-only </td>
|
|
354
361
|
<td class="gray"> <span class='bold dark-gray'>Allowed:<span class='blue'> always | never | (combination of: post | put | patch)</span></span> -
|
|
355
|
-
read-only
|
|
362
|
+
read-only fields in request schemas is <span class='blue'> always </span> hidden but are shown in response.
|
|
356
363
|
<br/>
|
|
357
364
|
If you do not want to hide read-only fields or hide them based on action you can configure this setting to 'never' or any combination of post | put | patch to indicate where to hide
|
|
358
365
|
<br/>
|
|
@@ -364,7 +371,7 @@
|
|
|
364
371
|
<tr>
|
|
365
372
|
<td class="mono bold right">schema-hide-write-only </td>
|
|
366
373
|
<td class="gray"> <span class='bold dark-gray'>Allowed:<span class='blue'> always | never</span></span> -
|
|
367
|
-
write-only
|
|
374
|
+
write-only fields in response schemas is <span class='blue'> always </span> hidden but are shown in request.
|
|
368
375
|
<br/>
|
|
369
376
|
If you do not want to hide write-only fields then set to 'never'
|
|
370
377
|
<br/>
|
|
@@ -797,7 +804,7 @@
|
|
|
797
804
|
<tr>
|
|
798
805
|
<td class="mono bold right">{method}-{path}</td>
|
|
799
806
|
<td class="gray"> each path is identified by an id. which is in the format of {method}-{path},
|
|
800
|
-
and certain invalid
|
|
807
|
+
and certain invalid characters such as {, }, #, space is replaced by hyphen (-).
|
|
801
808
|
Use this slot to insert HTML content into a specifi tag
|
|
802
809
|
</td>
|
|
803
810
|
</tr>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
5
|
+
<script async src='https://www.googletagmanager.com/gtag/js?id=UA-132775238-1'></script>
|
|
6
|
+
<script>
|
|
7
|
+
window.dataLayer = window.dataLayer || [];
|
|
8
|
+
function gtag(){dataLayer.push(arguments);}
|
|
9
|
+
gtag('js', new Date());
|
|
10
|
+
gtag('config', 'UA-132775238-1');
|
|
11
|
+
</script>
|
|
12
|
+
<meta charset='utf-8'>
|
|
13
|
+
<meta name='viewport' content='width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes'>
|
|
14
|
+
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;600&family=Roboto+Mono&display=swap" rel="stylesheet">
|
|
15
|
+
<link href='../index.css' rel='stylesheet'>
|
|
16
|
+
<script type='module' src='../rapidoc-min.js'></script>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<rapi-doc spec-url="../specs/readwrite.yaml"
|
|
20
|
+
id = "thedoc"
|
|
21
|
+
allow-authentication = "false"
|
|
22
|
+
allow-search = "false"
|
|
23
|
+
show-info = "false"
|
|
24
|
+
show-header = "false"
|
|
25
|
+
render-style = "read"
|
|
26
|
+
allow-try = "false"
|
|
27
|
+
regular-font = 'Open Sans'
|
|
28
|
+
mono-font = "Roboto Mono"
|
|
29
|
+
theme = "dark"
|
|
30
|
+
schema-style='tree'
|
|
31
|
+
>
|
|
32
|
+
<div slot="nav-logo" style="width:100%; display: flex; flex-direction:column;">
|
|
33
|
+
<div style="display: flex;justify-content: center; margin: 2px 0">
|
|
34
|
+
<button class='btn medium' onclick="document.getElementById('thedoc').setAttribute('schema-style', 'tree')" >Tree</button>
|
|
35
|
+
<button class='btn medium' onclick="document.getElementById('thedoc').setAttribute('schema-style', 'table')" >Table</button>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</rapi-doc>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
package/docs/examples.html
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
<!doctype html> <!-- Important: must specify -->
|
|
78
78
|
<html>
|
|
79
79
|
<head>
|
|
80
|
-
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8
|
|
80
|
+
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
|
|
81
81
|
<script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script>
|
|
82
82
|
</head>
|
|
83
83
|
<body>
|
|
@@ -188,7 +188,8 @@
|
|
|
188
188
|
<img
|
|
189
189
|
slot="nav-logo"
|
|
190
190
|
src="https://img.icons8.com/color/48/000000/youtube-play.png"
|
|
191
|
-
/>
|
|
191
|
+
/>
|
|
192
|
+
/>
|
|
192
193
|
</rapi-doc>
|
|
193
194
|
</code>
|
|
194
195
|
</pre>
|
package/docs/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<meta charset="utf-8">
|
|
16
16
|
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
17
17
|
<meta name="description" content="RapiDoc is Web Component for viewing Swagger & OpenAPI Spec. Supports themes, styling and various rendering styles">
|
|
18
|
-
<meta name="keywords" content="
|
|
18
|
+
<meta name="keywords" content="RapiDoc, openapi viewer, openapi to html, openapi renderer, ReDoc, Swagger, SwaggerUI, Custom Element, Web Component, OpenAPI, REST, themes, dark mode, markdown, API documentation, API mock">
|
|
19
19
|
|
|
20
20
|
<link rel="shortcut icon" type="image/png" href="./images/logo.png"/>
|
|
21
21
|
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
<!doctype html> <!-- Important: must specify -->
|
|
268
268
|
<html>
|
|
269
269
|
<head>
|
|
270
|
-
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8
|
|
270
|
+
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
|
|
271
271
|
<script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script>
|
|
272
272
|
</head>
|
|
273
273
|
<body>
|
package/docs/list.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<meta charset="utf-8">
|
|
15
15
|
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
16
16
|
<meta name="description" content="RapiDoc is Web Component for viewing Swagger & OpenAPI Spec. Supports themes, styling and various rendering styles">
|
|
17
|
-
<meta name="keywords" content="RapiDoc, ReDoc, Swagger, SwaggerUI, Custom Element,
|
|
17
|
+
<meta name="keywords" content="RapiDoc, openapi viewer, openapi to html, openapi renderer, ReDoc, Swagger, SwaggerUI, Custom Element, Web Component, OpenAPI, REST, themes, dark mode, markdown, API documentation">
|
|
18
18
|
|
|
19
19
|
<link rel="shortcut icon" type="image/png" href="./images/logo.png"/>
|
|
20
20
|
|
|
@@ -509,7 +509,11 @@
|
|
|
509
509
|
<tr><td class="mono-bold">
|
|
510
510
|
<a href="./examples/data-types.html"> Data types </a>
|
|
511
511
|
</td></tr>
|
|
512
|
-
|
|
512
|
+
|
|
513
|
+
<tr><td class="mono-bold">
|
|
514
|
+
<a href="./examples/readwrite.html"> Read and Write annotations </a>
|
|
515
|
+
</td></tr>
|
|
516
|
+
|
|
513
517
|
<tr><td class="mono-bold">
|
|
514
518
|
<a href="./examples/example-with-nested-refs.html"> Provide Examples with nested refs </a>
|
|
515
519
|
</td></tr>
|
package/docs/quickstart.html
CHANGED
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
<!doctype html> <!-- Important: must specify -->
|
|
88
88
|
<html>
|
|
89
89
|
<head>
|
|
90
|
-
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8
|
|
90
|
+
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
|
|
91
91
|
<script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script>
|
|
92
92
|
</head>
|
|
93
93
|
<body>
|