Skip to content

Commit

Permalink
Update swagger to 1.2.3 with fix verb tense typo, statik
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsam committed Dec 16, 2020
1 parent 3894cb7 commit fb94934
Show file tree
Hide file tree
Showing 28 changed files with 987 additions and 532 deletions.
5 changes: 4 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ import (
liquidityparams "github.com/tendermint/liquidity/app/params"
liquiditykeeper "github.com/tendermint/liquidity/x/liquidity/keeper"
liquiditytypes "github.com/tendermint/liquidity/x/liquidity/types"

// unnamed import of statik for swagger UI support
_ "github.com/tendermint/liquidity/client/docs/statik"
)

const appName = "LiquidityApp"
Expand Down Expand Up @@ -596,7 +599,7 @@ func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) {
}

staticServer := http.FileServer(statikFS)
rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer))
rtr.PathPrefix("/swagger-liquidity/").Handler(http.StripPrefix("/swagger-liquidity/", staticServer))
}

// GetMaccPerms returns a copy of the module account permissions
Expand Down
8 changes: 4 additions & 4 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,8 @@ func TestDepositPool(t *testing.T, simapp *LiquidityApp, ctx sdk.Context, X, Y s
require.NotEqual(t, sdk.ZeroInt(), poolCoin)

require.True(t, msgs[i].Executed)
require.True(t, msgs[i].Succeed)
require.True(t, msgs[i].ToDelete)
require.True(t, msgs[i].Succeeded)
require.True(t, msgs[i].ToBeDeleted)

// error balance after endblock
depositorBalanceX := simapp.BankKeeper.GetBalance(ctx, addrs[i], pool.ReserveCoinDenoms[0])
Expand Down Expand Up @@ -718,8 +718,8 @@ func TestWithdrawPool(t *testing.T, simapp *LiquidityApp, ctx sdk.Context, poolC

withdrawMsgs := simapp.LiquidityKeeper.GetAllLiquidityPoolBatchWithdrawMsgs(ctx, batch)
require.True(t, withdrawMsgs[i].Executed)
require.True(t, withdrawMsgs[i].Succeed)
require.True(t, withdrawMsgs[i].ToDelete)
require.True(t, withdrawMsgs[i].Succeeded)
require.True(t, withdrawMsgs[i].ToBeDeleted)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit fb94934

Please sign in to comment.