A simple shell script that will convert a given swagger / openapi2.0 JSON file to a PDF file.
326
Swagger2PDF is a simple shell script that will convert a given swagger / openapi2.0 JSON file to a PDF file. Heavily inspired by openapi-asciidoctor.
Available on dockerhub: https://hub.docker.com/r/angrypotato/swagger2pdf
To run Swagger2PDF, you will need:
OR you can use Docker.
To run the script, provide it with:
swagger.json you wish to convert/swagger2markup-cli.jar next to where the swagger2pdf.sh script is located./swagger2markup.properties next to where the swagger2pdf.sh script is located.e.g.:
$ ./swagger2pdf.sh -s swagger.json -c swagger2markup.properties
OR you can use the given Dockerfile. Build it like so:
$ docker build --pull --tag swagger2pdf:latest .
And then run it like so:
(assuming you have a swagger.json in your current directory)
$ docker run -v ${PWD}:/tmp/s2pdf swagger2pdf:latest /tmp/s2pdf/swagger.json /tmp/s2pdf
After running, the generated files should appear under the specified directory.
Content type
Image
Digest
Size
465.7 MB
Last updated
over 7 years ago
docker pull angrypotato/swagger2pdf