没有提供规范,即使它已生成json文件

I am trying to implement swagger with go and I am using go package swag for that. Not encountered any error. I am able to see swagger UI but it doesn't have specs in it even if I have generated a file in code.

I have installed a http-swagger package of go and added it to routes as mentioned in the document in https://github.com/swaggo/http-swagger.

  1. go get github.com/swaggo/swag/cmd/swag
  2. swag init (files created)
  3. go get -u github.com/swaggo/http-swagger
  4. followed exact same thing as documentation of package.