UNPKG

1.67 kBHTMLView Raw
1<!doctype html>
2<html lang="en">
3
4<head>
5 <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
6 <title>RapiPdf</title>
7 <style>
8 rapi-pdf {
9 margin:2px;
10 width:600px;
11 }
12 </style>
13</head>
14
15<body>
16 <!--
17 Some sample spec to try
18 http://10.21.83.83:8080/api/swagger.json
19 https://api.apis.guru/v2/specs/stripe.com/2019-08-14/swagger.json
20 https://api.apis.guru/v2/specs/github.com/v3/swagger.json
21 https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json
22 https://petstore.swagger.io/v2/swagger.json
23 https://assets.zuora.com/zuora-documentation/swagger.yaml <<< Large spec with lot of markdown
24 -->
25
26 <!--
27 <rapi-pdf id='rapipdf' spec-url="./examples/specs/test.json" include-info="false" include-security="false" include-toc="false"> </rapi-pdf>
28 -->
29 <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>
31 <rapi-pdf id='rapipdf' spec-url="./specs/bitbucket.json"> </rapi-pdf>
32 <rapi-pdf id='rapipdf' spec-url="./specs/data-types.yaml"> </rapi-pdf>
33 <rapi-pdf id='rapipdf' spec-url="./specs/data-types.yaml" include-example="true", button-label="WITH EXAMPLE"> </rapi-pdf>
34 <rapi-pdf id='rapipdf' spec-url="./specs/data-types.yaml" hide-input="true"> </rapi-pdf>
35
36
37 <button onclick="changeSpec()">Change Spec</button>
38 <script type="text/javascript">
39 function changeSpec(){
40 let el = document.getElementById("rapipdf");
41 el.setAttribute('spec-url', 'set new attrib');
42 }
43 </script>
44
45
46</body>
47
48</html>
\No newline at end of file