Skip to content

Commit

Permalink
Merge PR CosmWasm#25: Remove swagger (defined in the SDK)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez authored May 28, 2019
1 parent 787bd94 commit f44b317
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 57,552 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
cmd/gaiacli/swagger-ui/* linguist-vendored
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ draw-deps:
go get github.com/RobotsAndPencils/goviz
@goviz -i ./cmd/gaiad -d 2 | dot -Tpng -o dependency-graph.png

update-gaia-lite-docs:
@statik -src=cmd/gaiacli/swagger-ui -dest=cmd/gaiacli/ -f

clean:
rm -rf snapcraft-local.yaml build/

Expand Down
14 changes: 0 additions & 14 deletions cmd/gaiacli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"net/http"
"os"
"path"

Expand Down Expand Up @@ -40,14 +39,11 @@ import (
stakingclient "github.com/cosmos/cosmos-sdk/x/staking/client"
staking "github.com/cosmos/cosmos-sdk/x/staking/client/rest"

"github.com/rakyll/statik/fs"
"github.com/spf13/cobra"
"github.com/spf13/viper"

amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/libs/cli"

_ "github.com/cosmos/gaia/cmd/gaiacli/statik"
)

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

func registerSwaggerUI(rs *lcd.RestServer) {
statikFS, err := fs.New()
if err != nil {
panic(err)
}
staticServer := http.FileServer(statikFS)
rs.Mux.PathPrefix("/swagger-ui/").Handler(http.StripPrefix("/swagger-ui/", staticServer))
}

func initConfig(cmd *cobra.Command) error {
home, err := cmd.PersistentFlags().GetString(cli.HomeFlag)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion cmd/gaiacli/statik/init.go

This file was deleted.

Binary file removed cmd/gaiacli/swagger-ui/favicon-16x16.png
Binary file not shown.
Binary file removed cmd/gaiacli/swagger-ui/favicon-32x32.png
Binary file not shown.
60 changes: 0 additions & 60 deletions cmd/gaiacli/swagger-ui/index.html

This file was deleted.

67 changes: 0 additions & 67 deletions cmd/gaiacli/swagger-ui/oauth2-redirect.html

This file was deleted.

Loading

0 comments on commit f44b317

Please sign in to comment.