Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Swagger to 1.2.3 #92

Merged
merged 2 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 1 addition & 7 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Cosmos SDK Liquidity Module - REST and gRPC Gateway docs",
"description": "A REST interface for state queries, transactions",
"version": "1.2.2"
"version": "1.2.3"
},
"apis": [
{
Expand All @@ -21,12 +21,6 @@
"Params": "LiquidityQueries"
}
}
},
{
"url": "./client/docs/swagger_legacy.yaml",
"dereference": {
"circular": "ignore"
}
}
]
}
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading