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 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | |
27 |
|
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 |