Merge PR #4177: Update Staking Validators Rest Query
* Support pagination and status query params for /staking/validators * Rename BondStatusToString to String
This commit is contained in:
committed by
frog power 4000
parent
29755e66f6
commit
0e54369850
Vendored
+17
-1
@@ -763,7 +763,23 @@ paths:
|
||||
description: Internal Server Error
|
||||
/staking/validators:
|
||||
get:
|
||||
summary: Get all validator candidates
|
||||
summary: Get all validator candidates. By default it returns only the bonded validators.
|
||||
parameters:
|
||||
- in: query
|
||||
name: status
|
||||
type: string
|
||||
description: The validator bond status. Must be either 'bonded', 'unbonded', or 'unbonding'.
|
||||
x-example: bonded
|
||||
- in: query
|
||||
name: page
|
||||
description: The gage number.
|
||||
type: integer
|
||||
x-example: 1
|
||||
- in: query
|
||||
name: limit
|
||||
description: The maximum number of items per page.
|
||||
type: integer
|
||||
x-example: 1
|
||||
tags:
|
||||
- ICS21
|
||||
produces:
|
||||
|
||||
@@ -162,7 +162,6 @@ func QueryTxsByTagsRequestHandlerFn(cliCtx context.CLIContext, cdc *codec.Codec)
|
||||
}
|
||||
|
||||
tags, page, limit, err = rest.ParseHTTPArgs(r)
|
||||
|
||||
if err != nil {
|
||||
rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user