TianTianBigWang / apidoc

This is a tool and Golang package that uses swagger2.0 definitions to generate API static documents (such as pdf) based on template files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

apidoc

LICENSE GoDoc Go Report Card

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.

Installation

1、Source Code

Preconditions

The wkhtmltopdf package must be installed.

Install Command

go install github.com/zc2638/apidoc/cmd/apidoc@latest

2、Docker

docker pull zc2638/apidoc:latest

Use In Docker

docker run --rm zc2638/apidoc:latest --src https://petstore.swagger.io/v2/swagger.json --data > petstore.pdf

Use In Command

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

About

This is a tool and Golang package that uses swagger2.0 definitions to generate API static documents (such as pdf) based on template files.

License:Apache License 2.0


Languages

Language:Go 63.3%Language:HTML 35.0%Language:Dockerfile 1.8%