https://github.com/zc2638/apidoc
This is a tool and Golang package that uses swagger2.0 definitions to generate API static documents (such as pdf) .
https://github.com/zc2638/apidoc
apidoc document swagger
Last synced: 4 months ago
JSON representation
This is a tool and Golang package that uses swagger2.0 definitions to generate API static documents (such as pdf) .
- Host: GitHub
- URL: https://github.com/zc2638/apidoc
- Owner: zc2638
- License: apache-2.0
- Created: 2022-05-24T13:31:51.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-10T08:02:37.000Z (almost 4 years ago)
- Last Synced: 2024-06-19T16:46:04.988Z (almost 2 years ago)
- Topics: apidoc, document, swagger
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# apidoc

[](https://pkg.go.dev/github.com/zc2638/apidoc)
[](https://goreportcard.com/report/github.com/zc2638/apidoc)
English | [简体中文](./README_zh.md)
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.
- MacOS: `brew install Caskroom/cask/wkhtmltopdf`
- multiple operating systems can be found
at [https://wkhtmltopdf.org/downloads.html](https://wkhtmltopdf.org/downloads.html).
#### Install Command
```shell
go install github.com/zc2638/apidoc/cmd/apidoc@latest
```
### 2、Docker
```shell
docker pull zc2638/apidoc:latest
```
## Use In Docker
```shell
docker run --rm zc2638/apidoc:latest --src https://petstore.swagger.io/v2/swagger.json --data > petstore.pdf
```
## Use In Command
### From File
```shell
apidoc --src [--dest ]
```
### From URL
```shell
apidoc --src https://petstore.swagger.io/v2/swagger.json
```
## Toolkit Example
Please visit the [example](./example/main.go)