Skip to content

Commit d4e6760

Browse files
committed
added more example in product home-page
1 parent c70b9e5 commit d4e6760

File tree

14 files changed

+85
-39
lines changed

14 files changed

+85
-39
lines changed

dist/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<rapi-pdf id='rapipdf' spec-url="./examples/specs/test.json" include-info="false" include-security="false" include-toc="false"> </rapi-pdf>
2828
-->
2929
<rapi-pdf id='rapipdf' spec-url="./specs/petstore.json" pdf-schema-style="table"> </rapi-pdf>
30+
<rapi-pdf id='rapipdf' spec-url="./specs/petstore.json" pdf-schema-style="object"> </rapi-pdf>
3031
<rapi-pdf id='rapipdf' spec-url="./specs/bitbucket.json"> </rapi-pdf>
3132
<rapi-pdf id='rapipdf' spec-url="./specs/data-types.yaml"> </rapi-pdf>
3233

dist/index.html.gz

8 Bytes
Binary file not shown.

dist/rapipdf-min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rapipdf-min.js.gz

129 Bytes
Binary file not shown.

dist/report.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,33 @@ <h2> Quickstart & Demo</h2>
130130
&lt;/body&gt;
131131
&lt;/html&gt;
132132
</code></pre>
133-
<p>
134-
Go ahead, provide your Open API spec and click <span style="font-weight:bold">GENERATE PDF
135-
</span> !!!
136-
</p>
137133

134+
<div> Go ahead, provide your Open API spec and click GENERATE PDF !!! </div>
138135
<rapi-pdf id='rapipdf' style="width:730px; height:40px; font-size:18px;"
139136
spec-url="https://mrin9.github.io/RapiPdf/specs/petstore.json"
140137
button-bg="#b44646"
141-
pdf-title="My API Reference"
138+
pdf-title="API Reference"
142139
> </rapi-pdf>
140+
141+
<div style="margin-top:16px;"> With different Color scheme </div>
142+
<rapi-pdf id='rapipdf' style="width:730px; height:40px; font-size:18px;"
143+
spec-url="https://mrin9.github.io/RapiPdf/specs/petstore.json"
144+
pdf-schema-style="table"
145+
button-bg="#b44646"
146+
pdf-primary-color="teal",
147+
pdf-alternate-color="darkred"
148+
pdf-title="API Reference"
149+
> </rapi-pdf>
150+
151+
<div style="margin-top:16px;"> With an alternate request/response model represnation style </div>
152+
<rapi-pdf id='rapipdf' style="width:730px; height:40px; font-size:18px;"
153+
spec-url="https://mrin9.github.io/RapiPdf/specs/petstore.json"
154+
pdf-schema-style="table"
155+
button-bg="#b44646"
156+
pdf-title="API Reference"
157+
> </rapi-pdf>
158+
159+
143160
</div>
144161
</div>
145162

@@ -197,12 +214,6 @@ <h2> Attributes</h2>
197214
<td>false</td>
198215
</tr>
199216

200-
<tr>
201-
<td class="mono-bold">pdf-sort-tags</td>
202-
<td class="gray"> true to sort tags in the generated PDF</td>
203-
<td>true</td>
204-
</tr>
205-
206217
<tr>
207218
<td class="mono-bold">pdf-primary-color</td>
208219
<td class="gray">Color used for headings of main sections in PDF</td>
@@ -227,6 +238,12 @@ <h2> Attributes</h2>
227238
<td>(empty)</td>
228239
</tr>
229240

241+
<tr>
242+
<td class="mono-bold">pdf-schema-style</td>
243+
<td class="gray">style to display request and response schemas<br/>can be 'table' or 'object'</td>
244+
<td>object</td>
245+
</tr>
246+
230247
<tr>
231248
<td class="mono-bold">include-info</td>
232249
<td class="gray"> true to include info section in the generated PDF</td>
@@ -252,7 +269,7 @@ <h2> Attributes</h2>
252269
</tr>
253270

254271
<tr>
255-
<td class="mono-bold">include-api-list </td>
272+
<td class="mono-bold">include-api-list</td>
256273
<td class="gray">true to include list of all the APIs and their summary at the end in the generated PDF </td>
257274
<td>false</td>
258275
</tr>
@@ -302,7 +319,6 @@ <h2> Localization</h2>
302319
"url" : "URL",
303320
"termsOfService" : "Terms of service",
304321
"securitySchemes": "SECURITY SCHEMES",
305-
"key" : "KEY",
306322
"type" : "TYPE",
307323
"description" : "DESCRIPTION",
308324
"request" : "REQUEST",
@@ -311,8 +327,7 @@ <h2> Localization</h2>
311327
"responseModel" : "RESPONSE MODEL",
312328
"statusCode" : "STATUS CODE",
313329
"deprecated" : "DEPRECATED",
314-
"allowed" : "ALLOWED",
315-
"enumValues" : "ENUM",
330+
"allowed" : "allowed",
316331
"pattern" : "pattern",
317332
"parameters" : "Parameters",
318333
"method" : "METHOD",

docs/rapipdf-min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/welcome.html

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,33 @@ <h2> Quickstart & Demo</h2>
130130
&lt;/body&gt;
131131
&lt;/html&gt;
132132
</code></pre>
133-
<p>
134-
Go ahead, provide your Open API spec and click <span style="font-weight:bold">GENERATE PDF
135-
</span> !!!
136-
</p>
137133

134+
<div> Go ahead, provide your Open API spec and click GENERATE PDF !!! </div>
138135
<rapi-pdf id='rapipdf' style="width:730px; height:40px; font-size:18px;"
139136
spec-url="https://mrin9.github.io/RapiPdf/specs/petstore.json"
140137
button-bg="#b44646"
141-
pdf-title="My API Reference"
138+
pdf-title="API Reference"
142139
> </rapi-pdf>
140+
141+
<div style="margin-top:16px;"> With different Color scheme </div>
142+
<rapi-pdf id='rapipdf' style="width:730px; height:40px; font-size:18px;"
143+
spec-url="https://mrin9.github.io/RapiPdf/specs/petstore.json"
144+
pdf-schema-style="table"
145+
button-bg="#b44646"
146+
pdf-primary-color="teal",
147+
pdf-alternate-color="darkred"
148+
pdf-title="API Reference"
149+
> </rapi-pdf>
150+
151+
<div style="margin-top:16px;"> With an alternate request/response model represnation style </div>
152+
<rapi-pdf id='rapipdf' style="width:730px; height:40px; font-size:18px;"
153+
spec-url="https://mrin9.github.io/RapiPdf/specs/petstore.json"
154+
pdf-schema-style="table"
155+
button-bg="#b44646"
156+
pdf-title="API Reference"
157+
> </rapi-pdf>
158+
159+
143160
</div>
144161
</div>
145162

@@ -221,6 +238,12 @@ <h2> Attributes</h2>
221238
<td>(empty)</td>
222239
</tr>
223240

241+
<tr>
242+
<td class="mono-bold">pdf-schema-style</td>
243+
<td class="gray">style to display request and response schemas<br/>can be 'table' or 'object'</td>
244+
<td>object</td>
245+
</tr>
246+
224247
<tr>
225248
<td class="mono-bold">include-info</td>
226249
<td class="gray"> true to include info section in the generated PDF</td>
@@ -246,7 +269,7 @@ <h2> Attributes</h2>
246269
</tr>
247270

248271
<tr>
249-
<td class="mono-bold">include-api-list </td>
272+
<td class="mono-bold">include-api-list</td>
250273
<td class="gray">true to include list of all the APIs and their summary at the end in the generated PDF </td>
251274
<td>false</td>
252275
</tr>

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<rapi-pdf id='rapipdf' spec-url="./examples/specs/test.json" include-info="false" include-security="false" include-toc="false"> </rapi-pdf>
2828
-->
2929
<rapi-pdf id='rapipdf' spec-url="./specs/petstore.json" pdf-schema-style="table"> </rapi-pdf>
30+
<rapi-pdf id='rapipdf' spec-url="./specs/petstore.json" pdf-schema-style="object"> </rapi-pdf>
3031
<rapi-pdf id='rapipdf' spec-url="./specs/bitbucket.json"> </rapi-pdf>
3132
<rapi-pdf id='rapipdf' spec-url="./specs/data-types.yaml"> </rapi-pdf>
3233

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"swagger pdf",
2626
"openapi pdf"
2727
],
28-
"main": "src/rapipdf.js",
29-
"module": "src/rapipdf.js",
28+
"main": "./src/rapipdf.js",
29+
"module": "./src/rapipdf.js",
3030
"dependencies": {
3131
"json-refs": "^3.0.13",
3232
"marked": "^0.7.0",

0 commit comments

Comments
 (0)