ashikurcmt126 / golang_swagger_gin_demo_project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Step 1: Install Swag

  • go get -u github.com/swaggo/swag/cmd/swag
  • go get -u github.com/swaggo/gin-swagger
  • go get -u github.com/swaggo/files

Step 2: Install Swag

  • swag init

After every 'swag init' command run, a new docs folder will be created. Then browse http://localhost:8080/docs/index.html we will see the swagger documentation.

If your main.go file is not in root but uses the models defined in root, you can provide the path of main.go file.

  • swag init -d "./" -g "$FOLDER_NAME/main.go"

About


Languages

Language:Go 100.0%