UNPKG

rapipdf

Version:

RapiPdf - Generate PDF from Open API spec

48 lines (40 loc) 1.67 kB
<!doctype html> <html lang="en"> <head> <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"> <title>RapiPdf</title> <style> rapi-pdf { margin:2px; width:600px; } </style> </head> <body> <!-- Some sample spec to try http://10.21.83.83:8080/api/swagger.json https://api.apis.guru/v2/specs/stripe.com/2019-08-14/swagger.json https://api.apis.guru/v2/specs/github.com/v3/swagger.json https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json https://petstore.swagger.io/v2/swagger.json https://assets.zuora.com/zuora-documentation/swagger.yaml <<< Large spec with lot of markdown --> <!-- <rapi-pdf id='rapipdf' spec-url="./examples/specs/test.json" include-info="false" include-security="false" include-toc="false"> </rapi-pdf> --> <rapi-pdf id='rapipdf' spec-url="./specs/petstore.json" pdf-schema-style="table"> </rapi-pdf> <rapi-pdf id='rapipdf' spec-url="./specs/petstore.json" pdf-schema-style="object"> </rapi-pdf> <rapi-pdf id='rapipdf' spec-url="./specs/bitbucket.json"> </rapi-pdf> <rapi-pdf id='rapipdf' spec-url="./specs/data-types.yaml"> </rapi-pdf> <rapi-pdf id='rapipdf' spec-url="./specs/data-types.yaml" include-example="true", button-label="WITH EXAMPLE"> </rapi-pdf> <rapi-pdf id='rapipdf' spec-url="./specs/data-types.yaml" hide-input="true"> </rapi-pdf> <button onclick="changeSpec()">Change Spec</button> <script type="text/javascript"> function changeSpec(){ let el = document.getElementById("rapipdf"); el.setAttribute('spec-url', 'set new attrib'); } </script> </body> </html>