apidoc
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.
Preconditions
The wkhtmltopdf
package must be installed.
- MacOS:
brew install Caskroom/cask/wkhtmltopdf
- multiple operating systems can be found at https://wkhtmltopdf.org/downloads.html.
Installation
Source Code
go install github.com/zc2638/apidoc/cmd/apidoc@latest
Use
From File
apidoc --src <your-swagger-json> [--dest <your-output-dir>]
From URL
apidoc --src https://petstore.swagger.io/v2/swagger.json
Toolkit Example
Please visit the example