Skip to content

Commit f44b317

Browse files
authored
Merge PR #25: Remove swagger (defined in the SDK)
1 parent 787bd94 commit f44b317

17 files changed

+4
-57552
lines changed

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
cmd/gaiacli/swagger-ui/* linguist-vendored

Makefile

-3
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ draw-deps:
102102
go get github.com/RobotsAndPencils/goviz
103103
@goviz -i ./cmd/gaiad -d 2 | dot -Tpng -o dependency-graph.png
104104

105-
update-gaia-lite-docs:
106-
@statik -src=cmd/gaiacli/swagger-ui -dest=cmd/gaiacli/ -f
107-
108105
clean:
109106
rm -rf snapcraft-local.yaml build/
110107

cmd/gaiacli/main.go

-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"fmt"
5-
"net/http"
65
"os"
76
"path"
87

@@ -40,14 +39,11 @@ import (
4039
stakingclient "github.com/cosmos/cosmos-sdk/x/staking/client"
4140
staking "github.com/cosmos/cosmos-sdk/x/staking/client/rest"
4241

43-
"github.com/rakyll/statik/fs"
4442
"github.com/spf13/cobra"
4543
"github.com/spf13/viper"
4644

4745
amino "github.com/tendermint/go-amino"
4846
"github.com/tendermint/tendermint/libs/cli"
49-
50-
_ "github.com/cosmos/gaia/cmd/gaiacli/statik"
5147
)
5248

5349
func main() {
@@ -168,7 +164,6 @@ func txCmd(cdc *amino.Codec, mc []sdk.ModuleClient) *cobra.Command {
168164
// NOTE: details on the routes added for each module are in the module documentation
169165
// NOTE: If making updates here you also need to update the test helper in client/lcd/test_helper.go
170166
func registerRoutes(rs *lcd.RestServer) {
171-
registerSwaggerUI(rs)
172167
rpc.RegisterRPCRoutes(rs.CliCtx, rs.Mux)
173168
tx.RegisterTxRoutes(rs.CliCtx, rs.Mux, rs.Cdc)
174169
auth.RegisterRoutes(rs.CliCtx, rs.Mux, rs.Cdc, at.StoreKey)
@@ -180,15 +175,6 @@ func registerRoutes(rs *lcd.RestServer) {
180175
mintrest.RegisterRoutes(rs.CliCtx, rs.Mux, rs.Cdc)
181176
}
182177

183-
func registerSwaggerUI(rs *lcd.RestServer) {
184-
statikFS, err := fs.New()
185-
if err != nil {
186-
panic(err)
187-
}
188-
staticServer := http.FileServer(statikFS)
189-
rs.Mux.PathPrefix("/swagger-ui/").Handler(http.StripPrefix("/swagger-ui/", staticServer))
190-
}
191-
192178
func initConfig(cmd *cobra.Command) error {
193179
home, err := cmd.PersistentFlags().GetString(cli.HomeFlag)
194180
if err != nil {

cmd/gaiacli/statik/init.go

-1
This file was deleted.
-445 Bytes
Binary file not shown.
-1.11 KB
Binary file not shown.

cmd/gaiacli/swagger-ui/index.html

-60
This file was deleted.

cmd/gaiacli/swagger-ui/oauth2-redirect.html

-67
This file was deleted.

0 commit comments

Comments
 (0)