English | 简体中文
This is a tool and Golang
package that uses swagger2.0
definitions to generate API static documents (such as pdf)
based
on template files.
The wkhtmltopdf
package must be installed.
- MacOS:
brew install Caskroom/cask/wkhtmltopdf
- multiple operating systems can be found at https://wkhtmltopdf.org/downloads.html.
go install github.com/zc2638/apidoc/cmd/apidoc@latest
docker pull zc2638/apidoc:latest
docker run --rm zc2638/apidoc:latest --src https://petstore.swagger.io/v2/swagger.json --data > petstore.pdf
apidoc --src <your-swagger-json> [--dest <your-output-dir>]
apidoc --src https://petstore.swagger.io/v2/swagger.json
Please visit the example