Skip to content

Commit 56fe092

Browse files
authored
Merge pull request mrin9#68 from DaManDOH/enable_examples_flag
Enable examples flag
2 parents 3ef6fe7 + bb6c684 commit 56fe092

14 files changed

Lines changed: 311 additions & 41 deletions

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square"/>
66
<img src="https://img.shields.io/github/size/mrin9/rapipdf/dist/rapipdf-min.js.svg?colorB=blue&label=minified&style=flat-square">
77
<img src="https://img.shields.io/github/size/mrin9/rapipdf/dist/rapipdf-min.js.gz.svg?colorB=blue&label=zip&style=flat-square">
8-
</p>
8+
</p>
99

1010
# RapiPDF
1111
Custom Eelement for Open-API to PDF generation
1212

1313
## Features
14-
- Supports Swagger 2.0 and OpenAPI 3.0
15-
- Generate PDF using Web-Component
14+
- Supports Swagger 2.0 and OpenAPI 3.0
15+
- Generate PDF using Web-Component
1616
- Works with any framework or with no framework
1717
- Plenty of customizing options, including selection of brand colors
1818
- Supported on Chrome, FireFox and Safari. (Not yet tested on Edge)
@@ -21,15 +21,18 @@ Custom Eelement for Open-API to PDF generation
2121
[Check out the usage and examples](https://mrin9.github.io/RapiPdf/)
2222

2323
## Build Process
24-
We recommend `yarn` over `npm` as we use yarn [resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/) to keep the bundle size smaller. As of this writing this feature is not supported in npm natively
24+
We recommend `yarn` over `npm` as we use yarn [resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/) to keep the bundle size smaller. As of this writing this feature is not supported in npm natively
2525
```bash
2626
# Clone / Download the project then
2727
yarn install
2828

2929
# build will generate rapidoc-min.js, this is the only file you will need.
3030
# use it in the script tag of your html <script type="text/javascript" src="rapidoc-min.js"></script></body>
31-
yarn build
31+
yarn build
3232

33-
# for developement use yarn serve (this will start an webserver at port 8080, then navigate to localhost:8080)
33+
# for developement use yarn serve (this will start an webserver at port 8080, then navigate to localhost:8080)
3434
yarn serve
35+
36+
# alternative to yarn serve: (this will start an webserver at port 8080 listening to all adapters)
37+
yarn serve-everyone
3538
```

dist/index.html.gz

0 Bytes
Binary file not shown.

dist/rapipdf-min.js

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

dist/rapipdf-min.js.gz

2.68 KB
Binary file not shown.

dist/rapipdf-min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rapipdf-min.js.map.gz

7 Bytes
Binary file not shown.

dist/report.html

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

docs/api.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ <h2 style="margin: 0px 0 4px 0;"> Attributes</h2>
187187
<td class="gray">true to include list of all the APIs and their summary at the end in the generated PDF </td>
188188
<td>false</td>
189189
</tr>
190+
191+
<tr>
192+
<td class="mono-bold">include-example</td>
193+
<td class="gray">true to include OpenAPI-specified examples in the generated PDF </td>
194+
<td>false</td>
195+
</tr>
190196
</table>
191197
</div>
192198

docs/examples/example2.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
5+
<title>Example RapiPdf Output with API Examples</title>
6+
<script type="text/javascript" src="../rapipdf-min.js"></script>
7+
</head>
8+
<body>
9+
<rapi-pdf
10+
spec-url="../specs/openapi3_with_examples.json"
11+
style = "font-size: 10px"
12+
pdf-schema-style="table"
13+
include-example="true" />
14+
</body>
15+
</html>

docs/rapipdf-min.js

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

0 commit comments

Comments
 (0)