Browse Source

docs: remove "0 means latest" from swagger docs (#4236)

Fixes #4014

The reason being when you call any endpoint supporting optional height
and use `height=0`, it will return an error. For example:

```
$ curl localhost:2667/consensus_params?height=0
{
  "jsonrpc": "2.0",
  "id": -1,
  "error": {
    "code": -32603,
    "message": "Internal error",
    "data": "height must be greater than 0"
  }
}
```
pull/4238/head
Anton Kaliaev 5 years ago
committed by GitHub
parent
commit
0f69336148
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      rpc/swagger/swagger.yaml

+ 7
- 7
rpc/swagger/swagger.yaml View File

@ -94,7 +94,7 @@ paths:
- in: query - in: query
name: tx name: tx
required: true required: true
schema:
schema:
type: string type: string
example: "123" example: "123"
description: The transaction description: The transaction
@ -532,7 +532,7 @@ paths:
type: number type: number
default: 0 default: 0
example: 1 example: 1
description: height to return. If no height is provided, it will fetch the latest block. 0 means latest
description: height to return. If no height is provided, it will fetch the latest block.
tags: tags:
- Info - Info
description: | description: |
@ -557,7 +557,7 @@ paths:
parameters: parameters:
- in: query - in: query
name: height name: height
description: height to return. If no height is provided, it will fetch informations regarding the latest block. 0 means latest
description: height to return. If no height is provided, it will fetch informations regarding the latest block.
schema: schema:
type: number type: number
default: 0 default: 0
@ -586,8 +586,8 @@ paths:
parameters: parameters:
- in: query - in: query
name: height name: height
description: height to return. If no height is provided, it will fetch commit informations regarding the latest block. 0 means latest
schema:
description: height to return. If no height is provided, it will fetch commit informations regarding the latest block.
schema:
type: number type: number
default: 0 default: 0
example: 1 example: 1
@ -615,7 +615,7 @@ paths:
parameters: parameters:
- in: query - in: query
name: height name: height
description: height to return. If no height is provided, it will fetch validato set at the latest block. 0 means latest
description: height to return. If no height is provided, it will fetch validator set which corresponds to the latest block.
schema: schema:
type: number type: number
default: 0 default: 0
@ -723,7 +723,7 @@ paths:
parameters: parameters:
- in: query - in: query
name: height name: height
description: height to return. If no height is provided, it will fetch commit informations regarding the latest block. 0 means latest
description: height to return. If no height is provided, it will fetch commit informations regarding the latest block.
schema: schema:
type: number type: number
default: 0 default: 0


Loading…
Cancel
Save