소스 검색

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 {