feat: support swagger configuration (#48)

This commit is contained in:
pei
2019-03-24 10:56:13 +09:00
committed by Eason Lin
parent acdcd7f6da
commit db2fafd4b0
6 changed files with 98 additions and 15 deletions
+4 -1
View File
@@ -25,7 +25,10 @@ import (
func main() {
r := gin.New()
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
config := &ginSwagger.Config{
URL: "http://localhost:8080/swagger/doc.json", //The url pointing to API definition
}
r.GET("/swagger/*any", ginSwagger.CustomWrapHandler(config, swaggerFiles.Handler))
r.Run()
}