From 88eb85f39fa15c1f57626e8bb92f96e7a5632b17 Mon Sep 17 00:00:00 2001 From: "taekyu.kang" Date: Wed, 7 Feb 2024 13:47:59 +0900 Subject: [PATCH] trivial. support dynamic swagger url --- cmd/server/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index d1aae690..e07e43d1 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/pflag" "github.com/spf13/viper" - _ "github.com/openinfradev/tks-api/api/swagger" + "github.com/openinfradev/tks-api/api/swagger" "github.com/openinfradev/tks-api/internal/database" "github.com/openinfradev/tks-api/internal/keycloak" "github.com/openinfradev/tks-api/internal/mail" @@ -74,6 +74,7 @@ func init() { log.Error(err) } + swagger.SwaggerInfo.Host = viper.GetString("external-address") } // @title tks-api service