Browse Source

swagger.yaml: replace x-example with example

https://swagger.io/docs/specification/adding-examples/
pull/3993/head
Anton Kaliaev 5 years ago
parent
commit
9df1b006de
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 106 additions and 106 deletions
  1. +106
    -106
      rpc/swagger/swagger.yaml

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

@ -53,7 +53,7 @@ paths:
type: string
required: true
description: The transaction
x-example: "456"
example: "456"
produces:
- application/json
responses:
@ -94,7 +94,7 @@ paths:
type: string
required: true
description: The transaction
x-example: "123"
example: "123"
produces:
- application/json
responses:
@ -133,7 +133,7 @@ paths:
type: string
required: true
description: The transaction
x-example: "785"
example: "785"
produces:
- application/json
responses:
@ -278,7 +278,7 @@ paths:
a restricted set of possible symbols ( \t\n\r\\()"'=>< are not allowed).
operation can be "=", "<", "<=", ">", ">=", "CONTAINS". operand can be a
string (escaped with single quotes), number, date or time.
x-example: tm.event = 'Tx' AND tx.height = 5
example: tm.event = 'Tx' AND tx.height = 5
produces:
- application/json
responses:
@ -321,7 +321,7 @@ paths:
a restricted set of possible symbols ( \t\n\r\\()"'=>< are not allowed).
operation can be "=", "<", "<=", ">", ">=", "CONTAINS". operand can be a
string (escaped with single quotes), number, date or time.
x-example: tm.event = 'Tx' AND tx.height = 5
example: tm.event = 'Tx' AND tx.height = 5
produces:
- application/json
responses:
@ -474,12 +474,12 @@ paths:
name: minHeight
type: number
description: Minimum block height to return
x-example: 1
example: 1
- in: query
name: maxHeight
type: number
description: Maximum block height to return
x-example: 2
example: 2
tags:
- Info
description: |
@ -505,7 +505,7 @@ paths:
type: number
description: height to return. If no height is provided, it will fetch the latest block. 0 means latest
default: 0
x-example: 1
example: 1
tags:
- Info
description: |
@ -531,7 +531,7 @@ paths:
type: number
description: height to return. If no height is provided, it will fetch informations regarding the latest block. 0 means latest
default: 0
x-example: 1
example: 1
tags:
- Info
description: |
@ -557,7 +557,7 @@ paths:
type: number
description: height to return. If no height is provided, it will fetch commit informations regarding the latest block. 0 means latest
default: 0
x-example: 1
example: 1
tags:
- Info
description: |
@ -581,22 +581,22 @@ paths:
- in: query
name: height
type: number
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 at the latest block. 0 means latest
default: 0
x-example: 1
example: 1
- in: query
name: page
type: number
description: "Page number (1-based)"
required: false
x-example: 1
example: 1
default: 0
- in: query
name: per_page
type: number
description: "Number of entries per page (max: 100)"
required: false
x-example: 30
example: 30
default: 30
tags:
- Info
@ -680,7 +680,7 @@ paths:
type: number
description: height to return. If no height is provided, it will fetch commit informations regarding the latest block. 0 means latest
default: 0
x-example: 1
example: 1
tags:
- Info
description: |
@ -705,7 +705,7 @@ paths:
name: limit
type: number
description: Maximum number of unconfirmed transactions to return
x-example: 1
example: 1
tags:
- Info
description: |
@ -750,27 +750,27 @@ paths:
type: string
description: Query
required: true
x-example: "tx.height=1000"
example: "tx.height=1000"
- in: query
name: prove
type: boolean
description: Include proofs of the transactions inclusion in the block
required: false
x-example: true
example: true
default: false
- in: query
name: page
type: number
description: "Page number (1-based)"
required: false
x-example: 1
example: 1
default: 1
- in: query
name: per_page
type: number
description: "Number of entries per page (max: 100)"
required: false
x-example: 30
example: 30
default: 30
tags:
- Info
@ -797,13 +797,13 @@ paths:
type: string
description: transaction Hash to retrive
required: true
x-example: "0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"
example: "0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"
- in: query
name: prove
type: boolean
description: Include proofs of the transactions inclusion in the block
required: false
x-example: true
example: true
default: false
tags:
- Info
@ -849,26 +849,26 @@ paths:
type: string
description: Path to the data ("/a/b/c")
required: true
x-example: "/a/b/c"
example: "/a/b/c"
- in: query
name: data
type: string
description: Data
required: true
x-example: "IHAVENOIDEA"
example: "IHAVENOIDEA"
- in: query
name: height
type: number
description: Height (0 means latest)
required: false
x-example: 1
example: 1
default: 0
- in: query
name: prove
type: boolean
description: Include proofs of the transactions inclusion in the block
required: false
x-example: true
example: true
default: false
tags:
- ABCI
@ -896,7 +896,7 @@ paths:
type: string
description: Amino-encoded JSON evidence
required: true
x-example: "JSON_EVIDENCE_Amino_encoded"
example: "JSON_EVIDENCE_Amino_encoded"
tags:
- Info
description: |
@ -919,10 +919,10 @@ definitions:
properties:
id:
type: string
x-example: ""
example: ""
jsonrpc:
type: string
x-example: "2.0"
example: "2.0"
EmptyResponse:
description: Empty Response
allOf:
@ -940,28 +940,28 @@ definitions:
properties:
error:
type: string
x-example: "Description of failure"
example: "Description of failure"
ProtocolVersion:
type: object
properties:
p2p:
type: string
x-example: "7"
example: "7"
block:
type: string
x-example: "10"
example: "10"
app:
type: string
x-example: "0"
example: "0"
PubKey:
type: object
properties:
type:
type: string
x-example: "tendermint/PubKeyEd25519"
example: "tendermint/PubKeyEd25519"
value:
type: string
x-example: "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
example: "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
NodeInfo:
type: object
properties:
@ -969,61 +969,61 @@ definitions:
$ref: "#/definitions/ProtocolVersion"
id:
type: string
x-example: "5576458aef205977e18fd50b274e9b5d9014525a"
example: "5576458aef205977e18fd50b274e9b5d9014525a"
listen_addr:
type: string
x-example: "tcp:0.0.0.0:26656"
example: "tcp:0.0.0.0:26656"
network:
type: string
x-example: "cosmoshub-2"
example: "cosmoshub-2"
version:
type: string
x-example: "0.32.1"
example: "0.32.1"
channels:
type: string
x-example: "4020212223303800"
example: "4020212223303800"
moniker:
type: string
x-example: "moniker-node"
example: "moniker-node"
other:
type: object
properties:
tx_index:
type: string
x-example: "on"
example: "on"
rpc_address:
type: string
x-example: "tcp:0.0.0.0:26657"
x-example: "moniker-node"
example: "tcp:0.0.0.0:26657"
example: "moniker-node"
SyncInfo:
type: object
properties:
latest_block_hash:
type: string
x-example: "790BA84C3545FCCC49A5C629CEE6EA58A6E875C3862175BDC11EE7AF54703501"
example: "790BA84C3545FCCC49A5C629CEE6EA58A6E875C3862175BDC11EE7AF54703501"
latest_app_hash:
type: string
x-example: "C9AEBB441B787D9F1D846DE51F3826F4FD386108B59B08239653ABF59455C3F8"
example: "C9AEBB441B787D9F1D846DE51F3826F4FD386108B59B08239653ABF59455C3F8"
latest_block_height:
type: string
x-example: "1262196"
example: "1262196"
latest_block_time:
type: string
x-example: "2019-08-01T11:52:22.818762194Z"
example: "2019-08-01T11:52:22.818762194Z"
catching_up:
type: boolean
x-example: false
example: false
ValidatorInfo:
type: object
properties:
address:
type: string
x-example: "5D6A51A8E9899C44079C6AF90618BA0369070E6E"
example: "5D6A51A8E9899C44079C6AF90618BA0369070E6E"
pub_key:
$ref: "#/definitions/PubKey"
voting_power:
type: string
x-example: "0"
example: "0"
Status:
description: Status Response
type: object
@ -1047,67 +1047,67 @@ definitions:
properties:
Active:
type: boolean
x-example: true
example: true
Start:
type: string
x-example: "2019-07-31T14:31:28.66Z"
example: "2019-07-31T14:31:28.66Z"
Duration:
type: string
x-example: "168901060000000"
example: "168901060000000"
Idle:
type: string
x-example: "168901040000000"
example: "168901040000000"
Bytes:
type: string
x-example: "5"
example: "5"
Samples:
type: string
x-example: "1"
example: "1"
InstRate:
type: string
x-example: "0"
example: "0"
CurRate:
type: string
x-example: "0"
example: "0"
AvgRate:
type: string
x-example: "0"
example: "0"
PeakRate:
type: string
x-example: "0"
example: "0"
BytesRem:
type: string
x-example: "0"
example: "0"
TimeRem:
type: string
x-example: "0"
example: "0"
Progress:
type: number
x-example: 0
example: 0
Channel:
type: object
properties:
ID:
type: number
x-example: 48
example: 48
SendQueueCapacity:
type: string
x-example: "1"
example: "1"
SendQueueSize:
type: string
x-example: "0"
example: "0"
Priority:
type: string
x-example: "5"
example: "5"
RecentlySent:
type: string
x-example: "0"
example: "0"
ConnectionStatus:
type: object
properties:
Duration:
type: string
x-example: "168901057956119"
example: "168901057956119"
SendMonitor:
$ref: "#/definitions/Monitor"
RecvMonitor:
@ -1123,26 +1123,26 @@ definitions:
$ref: "#/definitions/NodeInfo"
is_outbound:
type: boolean
x-example: true
example: true
connection_status:
$ref: "#/definitions/ConnectionStatus"
remote_ip:
type: string
x-example: "95.179.155.35"
example: "95.179.155.35"
NetInfo:
type: object
properties:
listening:
type: boolean
x-example: true
example: true
listeners:
type: array
items:
type: string
x-example: "Listener(@)"
example: "Listener(@)"
n_peers:
type: number
x-example: "1"
example: "1"
peers:
type: array
items:
@ -1162,7 +1162,7 @@ definitions:
properties:
hash:
type: string
x-example: "D82C2734BB0E76C772A10994B210EF9D11505D1B98CB189D9CF7F9A5488672A5"
example: "D82C2734BB0E76C772A10994B210EF9D11505D1B98CB189D9CF7F9A5488672A5"
parts:
required:
- "total"
@ -1170,10 +1170,10 @@ definitions:
properties:
total:
type: string
x-example: "1"
example: "1"
hash:
type: string
x-example: "CB02DCAA7FB46BF874052EC2273FD0B1F2CF2E1593298D9781E60FE9C3DB8638"
example: "CB02DCAA7FB46BF874052EC2273FD0B1F2CF2E1593298D9781E60FE9C3DB8638"
type: object
type: object
BlockHeader:
@ -1200,49 +1200,49 @@ definitions:
properties:
block:
type: string
x-example: "10"
example: "10"
app:
type: string
x-example: "0"
example: "0"
type: object
chain_id:
type: string
x-example: "cosmoshub-2"
example: "cosmoshub-2"
height:
type: string
x-example: "12"
example: "12"
time:
type: string
x-example: "2019-04-22T17:01:51.701356223Z"
example: "2019-04-22T17:01:51.701356223Z"
last_block_id:
$ref: "#/definitions/BlockID"
last_commit_hash:
type: string
x-example: "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812"
example: "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812"
data_hash:
type: string
x-example: "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73"
example: "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73"
validators_hash:
type: string
x-example: "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0"
example: "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0"
next_validators_hash:
type: string
x-example: "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0"
example: "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0"
consensus_hash:
type: string
x-example: "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8"
example: "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8"
app_hash:
type: string
x-example: "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C"
example: "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C"
last_results_hash:
type: string
x-example: ""
example: ""
evidence_hash:
type: string
x-example: ""
example: ""
proposer_address:
type: string
x-example: "D540AB022088612AC74B287D076DBFBC4A377A2E"
example: "D540AB022088612AC74B287D076DBFBC4A377A2E"
type: object
BlockId:
required:
@ -1251,7 +1251,7 @@ definitions:
properties:
hash:
type: string
x-example: "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7"
example: "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7"
parts:
required:
- "total"
@ -1259,10 +1259,10 @@ definitions:
properties:
total:
type: string
x-example: "1"
example: "1"
hash:
type: string
x-example: "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
example: "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
type: object
type: object
BlockMeta:
@ -1270,7 +1270,7 @@ definitions:
properties:
block_size:
type: number
x-example: 1000000
example: 1000000
block_id:
$ref: "#/definitions/BlockId"
header:
@ -1286,7 +1286,7 @@ definitions:
properties:
last_height:
type: string
x-example: "1276718"
example: "1276718"
block_metas:
type: "array"
items:
@ -1312,27 +1312,27 @@ definitions:
properties:
type:
type: number
x-example: 2
example: 2
height:
type: string
x-example: "1262085"
example: "1262085"
round:
type: string
x-example: "0"
example: "0"
block_id:
$ref: "#/definitions/BlockID"
timestamp:
type: string
x-example: "2019-08-01T11:39:38.867269833Z"
example: "2019-08-01T11:39:38.867269833Z"
validator_address:
type: string
x-example: "000001E443FD237E4B616E2FA69DF4EE3D49A94F"
example: "000001E443FD237E4B616E2FA69DF4EE3D49A94F"
validator_index:
type: string
x-example: "0"
example: "0"
signature:
type: string
x-example: "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
example: "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
Block:
type: object
properties:
@ -1342,7 +1342,7 @@ definitions:
type: array
items:
type: string
x-example: "yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
example: "yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
evidence:
type: array
items:
@ -2874,4 +2874,4 @@ definitions:
properties:
Log:
type: string
x-example: "Dialing seeds in progress. See /net_info for details"
example: "Dialing seeds in progress. See /net_info for details"

Loading…
Cancel
Save