diff --git a/server/swagger.go b/server/swagger.go deleted file mode 100644 index c491fa7c338..00000000000 --- a/server/swagger.go +++ /dev/null @@ -1,28 +0,0 @@ -package server - -import ( - "io/fs" - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/docs" -) - -// RegisterSwaggerAPI provides a common function which registers swagger route with API Server -func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router, swaggerEnabled bool) error { - if !swaggerEnabled { - return nil - } - - root, err := fs.Sub(docs.SwaggerUI, "swagger-ui") - if err != nil { - return err - } - - staticServer := http.FileServer(http.FS(root)) - rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer)) - - return nil -}