Just provide swag
from swaggo/swag
- First, specify swagger with swaggo's declarative comments format in your
main.go
. - Then run below command under your project
$ docker run --volume $(pwd):/app --rm -it ytnobody/swag init
swagger.yaml
,swagger.json
anddocs.go
will be generated under./docs
if swagger spec you specified is valid.