gin-gonic middleware to serve Swagger Ui files and doc.json file which generated from Swagno
- Get Swagno
- Create your endpoint array. See: https://github.com/go-swagno/swagno/blob/master/README.md#getting-started
- Get swagno-gin
go get github.com/go-swagno/swagno-gin
- Import swagno-gin to your handler
import "github.com/go-swagno/swagno-gin/swagger"
- Be sure you created swagger instance and endpoints
- Create swagger handler
a.GET("/swagger/*any", swagger.SwaggerHandler(sw.GenerateDocs()))
- Visit /swagger and /swagger/doc.json for confirmation