From ba7e2358c5fcfef98891051e38014ff94675e948 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Sat, 19 Feb 2022 11:22:45 +0100 Subject: [PATCH] made http scheme in swagger documentation the default --- src/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.go b/src/main.go index 45d1a81..ff02bd8 100644 --- a/src/main.go +++ b/src/main.go @@ -12,7 +12,7 @@ import ( "github.com/bbernhard/signal-cli-rest-api/api" "github.com/bbernhard/signal-cli-rest-api/client" - _ "github.com/bbernhard/signal-cli-rest-api/docs" + docs "github.com/bbernhard/signal-cli-rest-api/docs" "github.com/bbernhard/signal-cli-rest-api/utils" "github.com/gin-gonic/gin" "github.com/robfig/cron/v3" @@ -60,6 +60,8 @@ func main() { avatarTmpDir := flag.String("avatar-tmp-dir", "/tmp/", "Avatar tmp directory") flag.Parse() + docs.SwaggerInfo.Schemes = []string{"http", "https"} + router := gin.New() router.Use(gin.LoggerWithConfig(gin.LoggerConfig{ SkipPaths: []string{"/v1/health"}, //do not log the health requests (to avoid spamming the log file)