浏览代码

fix: 修复swagger生产的bug

dcsunny 1 年之前
父节点
当前提交
895d08d2d2
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      openapiv2/handler.go

+ 1 - 4
openapiv2/handler.go

@@ -30,11 +30,8 @@ func NewHandler(servicesList []string, handlerOpts ...HandlerOption) http.Handle
 		if len(servicesList) > 0 {
 			w.Header().Set("Content-Type", "application/json")
 			w.WriteHeader(200)
-			list := []string{
-				"api.kuban.Kuban",
-			}
 			reply := map[string][]string{
-				"services": list,
+				"services": servicesList,
 			}
 			json.NewEncoder(w).Encode(reply)
 		} else {