This project is using Echo framework as another demonstration of using Swag package to convert Go annotations to Swagger Documentation 2.0.
For simplicity reasons, this repo doesn't use any database or local storage.
- Go 1.12.6 or newer
- Swag
- Get
swag
$ go get -u github.com/swaggo/swag/cmd/swag
- Add
swag
to PATH
$ export PATH=$PATH:$GOPATH/bin
- First clone this repo by opening Terminal and executing this command:
$ git clone https://github.com/gamertense/echo-to-swagger
- Run
swag init
command:
$ cd echo-to-swagger
$ swag init
See generated swagger.yaml
and the rest in echo-to-swagger/docs
folder.