rapipdf 2.2.1 → 3.0.0
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 +66 -14
- package/dist/chunks/generate-BQLGaRvK.js +386 -0
- package/dist/chunks/generate-BQLGaRvK.js.LICENSE.txt +224 -0
- package/dist/chunks/localize-CRvDVkIz.js +8 -0
- package/dist/node.js +13096 -0
- package/dist/node.js.LICENSE.txt +195 -0
- package/dist/rapipdf-min.js +352 -90
- package/dist/rapipdf-min.js.LICENSE.txt +224 -0
- package/dist/rapipdf.js +69 -0
- package/package.json +58 -52
- package/src/node.d.ts +82 -0
- package/src/rapipdf.d.ts +50 -0
- package/.babelrc +0 -11
- package/.eslintrc +0 -28
- package/dist/index.html +0 -7
- package/dist/index.html.gz +0 -0
- package/dist/rapipdf-min.js.gz +0 -0
- package/dist/rapipdf-min.js.map +0 -1
- package/dist/rapipdf-min.js.map.gz +0 -0
- package/dist/report.html +0 -53
- package/docs/api.html +0 -285
- package/docs/examples/example1.html +0 -68
- package/docs/examples/list.html +0 -27
- package/docs/examples/rapidoc-regular.woff2 +0 -0
- package/docs/examples/rapidoc-semi-bold.woff2 +0 -0
- package/docs/examples/roboto-mono-bold.woff2 +0 -0
- package/docs/examples/roboto-mono-regular.woff2 +0 -0
- package/docs/highlight/CHANGES.md +0 -1803
- package/docs/highlight/LICENSE +0 -24
- package/docs/highlight/README.md +0 -188
- package/docs/highlight/README.ru.md +0 -142
- package/docs/highlight/highlight.pack.js +0 -2
- package/docs/highlight/styles/a11y-dark.css +0 -99
- package/docs/highlight/styles/a11y-light.css +0 -99
- package/docs/highlight/styles/agate.css +0 -108
- package/docs/highlight/styles/an-old-hope.css +0 -89
- package/docs/highlight/styles/androidstudio.css +0 -66
- package/docs/highlight/styles/arduino-light.css +0 -88
- package/docs/highlight/styles/arta.css +0 -73
- package/docs/highlight/styles/ascetic.css +0 -45
- package/docs/highlight/styles/atelier-cave-dark.css +0 -83
- package/docs/highlight/styles/atelier-cave-light.css +0 -85
- package/docs/highlight/styles/atelier-dune-dark.css +0 -69
- package/docs/highlight/styles/atelier-dune-light.css +0 -69
- package/docs/highlight/styles/atelier-estuary-dark.css +0 -84
- package/docs/highlight/styles/atelier-estuary-light.css +0 -84
- package/docs/highlight/styles/atelier-forest-dark.css +0 -69
- package/docs/highlight/styles/atelier-forest-light.css +0 -69
- package/docs/highlight/styles/atelier-heath-dark.css +0 -69
- package/docs/highlight/styles/atelier-heath-light.css +0 -69
- package/docs/highlight/styles/atelier-lakeside-dark.css +0 -69
- package/docs/highlight/styles/atelier-lakeside-light.css +0 -69
- package/docs/highlight/styles/atelier-plateau-dark.css +0 -84
- package/docs/highlight/styles/atelier-plateau-light.css +0 -84
- package/docs/highlight/styles/atelier-savanna-dark.css +0 -84
- package/docs/highlight/styles/atelier-savanna-light.css +0 -84
- package/docs/highlight/styles/atelier-seaside-dark.css +0 -69
- package/docs/highlight/styles/atelier-seaside-light.css +0 -69
- package/docs/highlight/styles/atelier-sulphurpool-dark.css +0 -69
- package/docs/highlight/styles/atelier-sulphurpool-light.css +0 -69
- package/docs/highlight/styles/atom-one-dark-reasonable.css +0 -77
- package/docs/highlight/styles/atom-one-dark.css +0 -96
- package/docs/highlight/styles/atom-one-light.css +0 -96
- package/docs/highlight/styles/brown-paper.css +0 -64
- package/docs/highlight/styles/brown-papersq.png +0 -0
- package/docs/highlight/styles/codepen-embed.css +0 -60
- package/docs/highlight/styles/color-brewer.css +0 -71
- package/docs/highlight/styles/darcula.css +0 -77
- package/docs/highlight/styles/dark.css +0 -63
- package/docs/highlight/styles/darkula.css +0 -6
- package/docs/highlight/styles/default.css +0 -99
- package/docs/highlight/styles/docco.css +0 -97
- package/docs/highlight/styles/dracula.css +0 -76
- package/docs/highlight/styles/far.css +0 -71
- package/docs/highlight/styles/foundation.css +0 -88
- package/docs/highlight/styles/github-gist.css +0 -71
- package/docs/highlight/styles/github.css +0 -99
- package/docs/highlight/styles/gml.css +0 -78
- package/docs/highlight/styles/googlecode.css +0 -89
- package/docs/highlight/styles/grayscale.css +0 -101
- package/docs/highlight/styles/gruvbox-dark.css +0 -108
- package/docs/highlight/styles/gruvbox-light.css +0 -108
- package/docs/highlight/styles/hopscotch.css +0 -83
- package/docs/highlight/styles/hybrid.css +0 -102
- package/docs/highlight/styles/idea.css +0 -97
- package/docs/highlight/styles/ir-black.css +0 -73
- package/docs/highlight/styles/isbl-editor-dark.css +0 -112
- package/docs/highlight/styles/isbl-editor-light.css +0 -112
- package/docs/highlight/styles/kimbie.dark.css +0 -74
- package/docs/highlight/styles/kimbie.light.css +0 -74
- package/docs/highlight/styles/lightfair.css +0 -87
- package/docs/highlight/styles/magula.css +0 -70
- package/docs/highlight/styles/mono-blue.css +0 -59
- package/docs/highlight/styles/monokai-sublime.css +0 -83
- package/docs/highlight/styles/monokai.css +0 -70
- package/docs/highlight/styles/nord.css +0 -309
- package/docs/highlight/styles/obsidian.css +0 -88
- package/docs/highlight/styles/ocean.css +0 -74
- package/docs/highlight/styles/paraiso-dark.css +0 -72
- package/docs/highlight/styles/paraiso-light.css +0 -72
- package/docs/highlight/styles/pojoaque.css +0 -83
- package/docs/highlight/styles/pojoaque.jpg +0 -0
- package/docs/highlight/styles/purebasic.css +0 -96
- package/docs/highlight/styles/qtcreator_dark.css +0 -83
- package/docs/highlight/styles/qtcreator_light.css +0 -83
- package/docs/highlight/styles/railscasts.css +0 -106
- package/docs/highlight/styles/rainbow.css +0 -85
- package/docs/highlight/styles/routeros.css +0 -108
- package/docs/highlight/styles/school-book.css +0 -72
- package/docs/highlight/styles/school-book.png +0 -0
- package/docs/highlight/styles/shades-of-purple.css +0 -97
- package/docs/highlight/styles/solarized-dark.css +0 -84
- package/docs/highlight/styles/solarized-light.css +0 -84
- package/docs/highlight/styles/sunburst.css +0 -102
- package/docs/highlight/styles/tomorrow-night-blue.css +0 -75
- package/docs/highlight/styles/tomorrow-night-bright.css +0 -74
- package/docs/highlight/styles/tomorrow-night-eighties.css +0 -74
- package/docs/highlight/styles/tomorrow-night.css +0 -75
- package/docs/highlight/styles/tomorrow.css +0 -72
- package/docs/highlight/styles/vs.css +0 -68
- package/docs/highlight/styles/vs2015.css +0 -115
- package/docs/highlight/styles/xcode.css +0 -104
- package/docs/highlight/styles/xt256.css +0 -92
- package/docs/highlight/styles/zenburn.css +0 -80
- package/docs/images/console.svg +0 -12
- package/docs/images/dark_ss.png +0 -0
- package/docs/images/easy.svg +0 -14
- package/docs/images/fast.svg +0 -8
- package/docs/images/gears.svg +0 -11
- package/docs/images/light_ss.png +0 -0
- package/docs/images/logo-outline.png +0 -0
- package/docs/images/logo.png +0 -0
- package/docs/images/love.svg +0 -8
- package/docs/images/mask.svg +0 -16
- package/docs/images/mouse.svg +0 -7
- package/docs/images/pdf_sample1.png +0 -0
- package/docs/images/pdf_sample2.png +0 -0
- package/docs/images/webcomponent.svg +0 -13
- package/docs/index.css +0 -257
- package/docs/index.html +0 -186
- package/docs/rapipdf-min.js +0 -95
- package/docs/specs/allof-primitives.json +0 -80
- package/docs/specs/allof.json +0 -73
- package/docs/specs/anyof.json +0 -84
- package/docs/specs/basic.json +0 -75
- package/docs/specs/bitbucket.json +0 -12916
- package/docs/specs/data-types.yaml +0 -168
- package/docs/specs/gcloud.json +0 -1347
- package/docs/specs/no-server.json +0 -1
- package/docs/specs/oneof.json +0 -64
- package/docs/specs/petstore.json +0 -1042
- package/docs/specs/petstore_extended.yaml +0 -889
- package/docs/specs/temp.json +0 -53
- package/docs/specs/test-specs/large-models.json +0 -5998
- package/docs/specs/test-specs/long-descriptions.json +0 -5443
- package/docs/specs/test-specs/long-paths.json +0 -9562
- package/docs/specs/test-specs/oneof-allof-nested.yaml +0 -105
- package/docs/specs/test-specs/partial-spec-main.json +0 -29
- package/docs/specs/test-specs/partial.json +0 -17
- package/docs/specs/test-specs/petstore_complex_request.yaml +0 -335
- package/docs/specs/test-specs/petstore_experimental.yaml +0 -167
- package/docs/specs/test-specs/xxx-of-with-primitives-and-recursive-model.yaml +0 -952
- package/docs/welcome.html +0 -186
- package/index.html +0 -48
- package/logo.png +0 -0
- package/src/index.js +0 -3
- package/src/markdown.js +0 -120
- package/src/object-tree-gen.js +0 -370
- package/src/pdf-gen.js +0 -113
- package/src/pdf-parts-gen.js +0 -488
- package/src/rapipdf.js +0 -246
- package/src/spec-parser.js +0 -178
- package/src/table-layouts.js +0 -35
- package/src/vfs_fonts.js +0 -7
- package/webpack.config.js +0 -118
package/docs/api.html
DELETED
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
|
|
3
|
-
<head>
|
|
4
|
-
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
5
|
-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-132775238-2"></script>
|
|
6
|
-
<script>
|
|
7
|
-
window.dataLayer = window.dataLayer || [];
|
|
8
|
-
function gtag(){dataLayer.push(arguments);}
|
|
9
|
-
gtag('js', new Date());
|
|
10
|
-
|
|
11
|
-
gtag('config', 'UA-132775238-2');
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<meta charset="utf-8">
|
|
16
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
17
|
-
<meta name="description" content="RapiPdf is Web Component based Swagger & OpenAPI Spec to PDF generator">
|
|
18
|
-
<meta name="keywords" content="RapiDoc,ReDoc,Swagger,SwaggerUI,Custom Element,Web Component,OpenAPI,REST">
|
|
19
|
-
|
|
20
|
-
<link rel="shortcut icon" type="image/png" href="./images/logo-outline.png"/>
|
|
21
|
-
|
|
22
|
-
<!-- Fonts -->
|
|
23
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700" rel="stylesheet">
|
|
24
|
-
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet">
|
|
25
|
-
|
|
26
|
-
<!-- Code Highlight -->
|
|
27
|
-
<link rel="stylesheet" href="./highlight/styles/zenburn.css">
|
|
28
|
-
<script src="./highlight/highlight.pack.js"></script>
|
|
29
|
-
<script>hljs.initHighlightingOnLoad();</script>
|
|
30
|
-
|
|
31
|
-
<link rel="stylesheet" href="index.css">
|
|
32
|
-
<link rel="stylesheet" href="table.css">
|
|
33
|
-
|
|
34
|
-
<title>RapiPDF - Web Component based Swagger & OpenAPI PDF Generator</title>
|
|
35
|
-
<style>
|
|
36
|
-
.m-table {
|
|
37
|
-
width:100%;
|
|
38
|
-
}
|
|
39
|
-
#main-img{
|
|
40
|
-
width:740px;
|
|
41
|
-
}
|
|
42
|
-
</style>
|
|
43
|
-
</head>
|
|
44
|
-
|
|
45
|
-
<body>
|
|
46
|
-
<div class='topbar'>
|
|
47
|
-
<div class="header">
|
|
48
|
-
<a class="menu-item" data-action="url" href="./index.html">
|
|
49
|
-
<img class="logo" src="./images/logo.png" style="width:36px;height:36px;margin-right:10px;" href="./index.html"/>
|
|
50
|
-
</a>
|
|
51
|
-
<div class="product-name">RapiPDF</div>
|
|
52
|
-
<div class="menu" style="flex:1"></div>
|
|
53
|
-
<nav class="menu" onclick="goToSection(event)">
|
|
54
|
-
<a class="menu-item" data-action="url" href="./index.html"> Home </a>
|
|
55
|
-
<a class="menu-item" data-action="url" href="https://mrin9.github.io/RapiDoc/"> RapiDoc </a>
|
|
56
|
-
<a class="menu-item" data-action="git" href="https://github.com/mrin9/RapiPdf"> GitHub </a>
|
|
57
|
-
</nav>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
<div class="banner" id="banner" style="max-height:255px; overflow:hidden">
|
|
61
|
-
<div style="display:flex; justify-content: center; margin-top:20px">
|
|
62
|
-
<div style="display:block">
|
|
63
|
-
<img class="screenshot shadow3 hide-in-mobile" style="filter: opacity(0.85);" src="./images/pdf_sample1.png" />
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
<div>
|
|
69
|
-
<div class="container" style="display:flex; padding:32px 0 0 0; justify-content: center;">
|
|
70
|
-
<a href="#att"> Attributes</a> |
|
|
71
|
-
<a href="#methods"> Methods</a> |
|
|
72
|
-
<a href="#localize"> Localization</a>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<!-- Start of API -->
|
|
77
|
-
<div class="api container" id="api">
|
|
78
|
-
<div style="display:flex; flex-direction: column; ">
|
|
79
|
-
<a id="att"></a>
|
|
80
|
-
<h2 style="margin: 0px 0 4px 0;"> Attributes</h2>
|
|
81
|
-
<div class="table-block">
|
|
82
|
-
<table class="m-table">
|
|
83
|
-
<tr>
|
|
84
|
-
<th class="attr-col">Attribute</th>
|
|
85
|
-
<th style="text-align:left">Description </th>
|
|
86
|
-
<th class="default-col">Default</th>
|
|
87
|
-
</tr>
|
|
88
|
-
|
|
89
|
-
<tr>
|
|
90
|
-
<td class="mono-bold">spec-url </td>
|
|
91
|
-
<td class="gray">url of the OpenAPI spec to view </td>
|
|
92
|
-
<td>(empty)</td>
|
|
93
|
-
</tr>
|
|
94
|
-
|
|
95
|
-
<tr>
|
|
96
|
-
<td class="mono-bold">button-label</td>
|
|
97
|
-
<td class="gray"> Label on the Button</td>
|
|
98
|
-
<td>GENERATE PDF</td>
|
|
99
|
-
</tr>
|
|
100
|
-
|
|
101
|
-
<tr>
|
|
102
|
-
<td class="mono-bold">button-bg</td>
|
|
103
|
-
<td class="gray">Background color for the button</td>
|
|
104
|
-
<td>#0078d7</td>
|
|
105
|
-
</tr>
|
|
106
|
-
|
|
107
|
-
<tr>
|
|
108
|
-
<td class="mono-bold">button-color</td>
|
|
109
|
-
<td class="gray">Text color on the button</td>
|
|
110
|
-
<td>white</td>
|
|
111
|
-
</tr>
|
|
112
|
-
|
|
113
|
-
<tr>
|
|
114
|
-
<td class="mono-bold">input-bg</td>
|
|
115
|
-
<td class="gray">Background color for text input</td>
|
|
116
|
-
<td>white</td>
|
|
117
|
-
</tr>
|
|
118
|
-
|
|
119
|
-
<tr>
|
|
120
|
-
<td class="mono-bold">input-color</td>
|
|
121
|
-
<td class="gray">Text color of the input box</td>
|
|
122
|
-
<td>#333</td>
|
|
123
|
-
</tr>
|
|
124
|
-
|
|
125
|
-
<tr>
|
|
126
|
-
<td class="mono-bold">hide-input</td>
|
|
127
|
-
<td class="gray"> true to hide input Text box </td>
|
|
128
|
-
<td>false</td>
|
|
129
|
-
</tr>
|
|
130
|
-
|
|
131
|
-
<tr>
|
|
132
|
-
<td class="mono-bold">pdf-primary-color</td>
|
|
133
|
-
<td class="gray">Color used for headings of main sections in PDF</td>
|
|
134
|
-
<td>#b44646</td>
|
|
135
|
-
</tr>
|
|
136
|
-
|
|
137
|
-
<tr>
|
|
138
|
-
<td class="mono-bold">pdf-alternate-color</td>
|
|
139
|
-
<td class="gray">Color used for sub headings</td>
|
|
140
|
-
<td>#005b96</td>
|
|
141
|
-
</tr>
|
|
142
|
-
|
|
143
|
-
<tr>
|
|
144
|
-
<td class="mono-bold">pdf-title</td>
|
|
145
|
-
<td class="gray">Title of the generated PDF</td>
|
|
146
|
-
<td>API Reference</td>
|
|
147
|
-
</tr>
|
|
148
|
-
|
|
149
|
-
<tr>
|
|
150
|
-
<td class="mono-bold">pdf-footer-text</td>
|
|
151
|
-
<td class="gray">Text to be printed at the bottom of every page</td>
|
|
152
|
-
<td>(empty)</td>
|
|
153
|
-
</tr>
|
|
154
|
-
|
|
155
|
-
<tr>
|
|
156
|
-
<td class="mono-bold">pdf-schema-style</td>
|
|
157
|
-
<td class="gray">style to display request and response schemas<br/>can be 'table' or 'object'</td>
|
|
158
|
-
<td>object</td>
|
|
159
|
-
</tr>
|
|
160
|
-
|
|
161
|
-
<tr>
|
|
162
|
-
<td class="mono-bold">include-info</td>
|
|
163
|
-
<td class="gray"> true to include info section in the generated PDF</td>
|
|
164
|
-
<td>true</td>
|
|
165
|
-
</tr>
|
|
166
|
-
|
|
167
|
-
<tr>
|
|
168
|
-
<td class="mono-bold">include-toc</td>
|
|
169
|
-
<td class="gray">true to include table-of-contents in the generated PDF</td>
|
|
170
|
-
<td>true</td>
|
|
171
|
-
</tr>
|
|
172
|
-
|
|
173
|
-
<tr>
|
|
174
|
-
<td class="mono-bold">include-security</td>
|
|
175
|
-
<td class="gray">true to include security section in the generated PDF</td>
|
|
176
|
-
<td>true</td>
|
|
177
|
-
</tr>
|
|
178
|
-
|
|
179
|
-
<tr>
|
|
180
|
-
<td class="mono-bold">include-api-details</td>
|
|
181
|
-
<td class="gray">true to include all the API details in the generated PDF</td>
|
|
182
|
-
<td>true</td>
|
|
183
|
-
</tr>
|
|
184
|
-
|
|
185
|
-
<tr>
|
|
186
|
-
<td class="mono-bold">include-api-list</td>
|
|
187
|
-
<td class="gray">true to include list of all the APIs and their summary at the end in the generated PDF </td>
|
|
188
|
-
<td>false</td>
|
|
189
|
-
</tr>
|
|
190
|
-
</table>
|
|
191
|
-
</div>
|
|
192
|
-
|
|
193
|
-
<a id="methods"></a>
|
|
194
|
-
<h2 style="margin: 24px 0 4px 0;" > Methods</h2>
|
|
195
|
-
<div class="table-block">
|
|
196
|
-
<table class="m-table">
|
|
197
|
-
<tr>
|
|
198
|
-
<th > Name</th>
|
|
199
|
-
<th >Description </th>
|
|
200
|
-
</tr>
|
|
201
|
-
<tr>
|
|
202
|
-
<td class="mono-bold">generatePdf(spec)</td>
|
|
203
|
-
<td class="gray">
|
|
204
|
-
to programmatically generate the PDF. <br/>
|
|
205
|
-
Takes a single parameter that can be :
|
|
206
|
-
<ul>
|
|
207
|
-
<li> either a string containing the url of the specs</li>
|
|
208
|
-
<li> or a JSON object representing a valid spec</li>
|
|
209
|
-
</ul>
|
|
210
|
-
<a href="https://github.com/mrin9/RapiPdf/blob/master/docs/examples/example1.html"> Example </a>
|
|
211
|
-
</td>
|
|
212
|
-
</tr>
|
|
213
|
-
<tr>
|
|
214
|
-
<td class="mono-bold">setAttribute(attr-name, value)</td>
|
|
215
|
-
<td class="gray">All HTML elements contains setAttribute() method, You may use this method to programmatically update/change any of its properties</td>
|
|
216
|
-
</tr>
|
|
217
|
-
</table>
|
|
218
|
-
</div>
|
|
219
|
-
|
|
220
|
-
<a id="localize"></a>
|
|
221
|
-
<h2 style="margin: 32px 0 4px 0;"> Localization</h2>
|
|
222
|
-
<div class="mono-bold" style="text-align: center;">create a <template> inside <rapi-pdf> element and provide the translations</div>
|
|
223
|
-
<pre class="shadow code-block"><code class="html" style="border-radius:4px">
|
|
224
|
-
<rapi-pdf spec-url="https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json">
|
|
225
|
-
<template>
|
|
226
|
-
{
|
|
227
|
-
"index" : "INDEX",
|
|
228
|
-
"api" : "API",
|
|
229
|
-
"apiList" : "API List",
|
|
230
|
-
"apiReference" : "API Reference",
|
|
231
|
-
"apiVersion" : "API Version",
|
|
232
|
-
"contact" : "CONTACT",
|
|
233
|
-
"name" : "NAME",
|
|
234
|
-
"email" : "EMAIL",
|
|
235
|
-
"url" : "URL",
|
|
236
|
-
"termsOfService" : "Terms of service",
|
|
237
|
-
"securitySchemes": "SECURITY SCHEMES",
|
|
238
|
-
"type" : "TYPE",
|
|
239
|
-
"description" : "DESCRIPTION",
|
|
240
|
-
"request" : "REQUEST",
|
|
241
|
-
"requestBody" : "REQUEST BODY",
|
|
242
|
-
"response" : "RESPONSE",
|
|
243
|
-
"responseModel" : "RESPONSE MODEL",
|
|
244
|
-
"statusCode" : "STATUS CODE",
|
|
245
|
-
"deprecated" : "DEPRECATED",
|
|
246
|
-
"allowed" : "allowed",
|
|
247
|
-
"pattern" : "pattern",
|
|
248
|
-
"parameters" : "Parameters",
|
|
249
|
-
"method" : "METHOD",
|
|
250
|
-
"securityAndAuthentication" : "Security and Authentication",
|
|
251
|
-
"noRequestParameters" : "No request parameters",
|
|
252
|
-
}
|
|
253
|
-
</template>
|
|
254
|
-
</rapi-pdf>
|
|
255
|
-
</code>
|
|
256
|
-
</pre>
|
|
257
|
-
|
|
258
|
-
</div>
|
|
259
|
-
</div>
|
|
260
|
-
<!-- End of API -->
|
|
261
|
-
|
|
262
|
-
<div id="footer" class="footer">
|
|
263
|
-
<div class="footer-item"> MIT Licence</div>
|
|
264
|
-
<div class="footer-item"> <a href="https://github.com/mrin9/RapiDoc"> GitHub</a></div>
|
|
265
|
-
<div class="footer-item"> <a href="https://mrin9.github.io/RapiPdf/"> RapiPDF</a></div>
|
|
266
|
-
<div class="footer-item hide-in-mobile"> <a href="https://www.npmjs.com/package/rapidoc"> npm</a></div>
|
|
267
|
-
</div>
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
<script>
|
|
271
|
-
function goToSection(e){
|
|
272
|
-
if (e.target.dataset.action==='url'){
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
e.preventDefault();
|
|
277
|
-
var gotoEl = document.getElementById(e.target.getAttribute('href').substring(1));
|
|
278
|
-
if (gotoEl){
|
|
279
|
-
gotoEl.scrollIntoView({ block: 'start', behavior: 'smooth' });
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
</script>
|
|
283
|
-
</body>
|
|
284
|
-
|
|
285
|
-
</html>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<head>
|
|
3
|
-
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
6
|
-
<script type="text/javascript" src="../rapipdf-min.js"></script>
|
|
7
|
-
<style>
|
|
8
|
-
rapi-pdf{ display:none; }
|
|
9
|
-
.btn-default {
|
|
10
|
-
font-size: 16px;
|
|
11
|
-
padding: 6px 16px;
|
|
12
|
-
text-align: center;
|
|
13
|
-
white-space: nowrap;
|
|
14
|
-
background-color:orangered;
|
|
15
|
-
color:white;
|
|
16
|
-
border: 0px solid #333;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
19
|
-
</style>
|
|
20
|
-
</head>
|
|
21
|
-
<body>
|
|
22
|
-
<rapi-pdf id="thedoc"> </rapi-pdf>
|
|
23
|
-
<button id="btn" class="btn-default" type="button">Generate PDF from JSON </button>
|
|
24
|
-
<script>
|
|
25
|
-
var btnEl = document.getElementById("btn");
|
|
26
|
-
btnEl.addEventListener('click', (ev) => {
|
|
27
|
-
let docEl = document.getElementById("thedoc");
|
|
28
|
-
let strSpec = `
|
|
29
|
-
{
|
|
30
|
-
"swagger": "2.0",
|
|
31
|
-
"info": { "description": "Sample to test" },
|
|
32
|
-
"paths": {
|
|
33
|
-
"/pets": {
|
|
34
|
-
"get": {
|
|
35
|
-
"description": "Returns all pets from the system that the user has access to",
|
|
36
|
-
"produces" : [ "application/json"],
|
|
37
|
-
"responses": {
|
|
38
|
-
"200": {
|
|
39
|
-
"description": "A list of pets.",
|
|
40
|
-
"schema": {
|
|
41
|
-
"type" : "array",
|
|
42
|
-
"items": { "$ref": "#/definitions/Pet"}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"definitions": {
|
|
50
|
-
"Pet": {
|
|
51
|
-
"type": "object",
|
|
52
|
-
"properties": {
|
|
53
|
-
"id" : { "type": "integer" },
|
|
54
|
-
"name": { "type": "string" },
|
|
55
|
-
"tag" : { "type": "string" }
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}`;
|
|
60
|
-
let objSpec = JSON.parse(strSpec);
|
|
61
|
-
docEl.generatePdf(objSpec);
|
|
62
|
-
})
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
</body>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</html>
|
package/docs/examples/list.html
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<head>
|
|
3
|
-
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
6
|
-
<script type="text/javascript" src="../rapipdf-min.js"></script>
|
|
7
|
-
<style>
|
|
8
|
-
rapi-pdf {
|
|
9
|
-
margin:2px;
|
|
10
|
-
width:600px;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<rapi-pdf spec-url="../specs/basic.json" button-label="Basic"></rapi-pdf>
|
|
16
|
-
<rapi-pdf spec-url="../specs/allof.json" button-label="all-of"></rapi-pdf>
|
|
17
|
-
<rapi-pdf spec-url="../specs/oneof.json" button-label="one-of"></rapi-pdf>
|
|
18
|
-
<rapi-pdf spec-url="../specs/petstore_extended.yaml" button-label="Extended"></rapi-pdf>
|
|
19
|
-
<rapi-pdf spec-url="../specs/test-specs/petstore_experimental.yaml" button-label="Experimental"></rapi-pdf>
|
|
20
|
-
<rapi-pdf spec-url="../specs/test-specs/petstore_complex_request.yaml" button-label="Complex"></rapi-pdf>
|
|
21
|
-
<rapi-pdf spec-url="../specs/bitbucket.json" button-label="BitBucket"></rapi-pdf>
|
|
22
|
-
<rapi-pdf spec-url="https://api.apis.guru/v2/specs/github.com/v3/swagger.json" button-label="GitHub"></rapi-pdf>
|
|
23
|
-
|
|
24
|
-
</body>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|