Skip to content

Commit

Permalink
Merge pull request #92 from b-harvest/fix-swagger
Browse files Browse the repository at this point in the history
Update Swagger to 1.2.3
  • Loading branch information
dongsam authored Dec 16, 2020
2 parents 6202279 + fb94934 commit ba15d26
Show file tree
Hide file tree
Showing 41 changed files with 1,380 additions and 9,299 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
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

0 comments on commit ba15d26

Please sign in to comment.