Browse Source

rpc: add documentation for genesis chunked api (#6776)

pull/6781/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
6a94b55d12
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 65 additions and 1 deletions
  1. +1
    -0
      CHANGELOG_PENDING.md
  2. +64
    -1
      rpc/openapi/openapi.yaml

+ 1
- 0
CHANGELOG_PENDING.md View File

@ -24,6 +24,7 @@ Friendly reminder: We have a [bug bounty program](https://hackerone.com/tendermi
- [fastsync/rpc] \#6620 Add TotalSyncedTime & RemainingTime to SyncInfo in /status RPC (@JayT106)
- [rpc/grpc] \#6725 Mark gRPC in the RPC layer as deprecated.
- [blockchain/v2] \#6730 Fast Sync v2 is deprecated, please use v0
- [rpc] Add genesis_chunked method to support paginated and parallel fetching of large genesis documents.
- Apps
- [ABCI] \#6408 Change the `key` and `value` fields from `[]byte` to `string` in the `EventAttribute` type. (@alexanderbez)


+ 64
- 1
rpc/openapi/openapi.yaml View File

@ -806,6 +806,7 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/genesis:
get:
summary: Get Genesis
@ -813,7 +814,7 @@ paths:
tags:
- Info
description: |
Get genesis.
Get the genesis document.
responses:
"200":
description: Genesis results.
@ -827,6 +828,39 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/genesis_chunked:
get:
summary: Get Genesis in paginated chunks
operationId: genesis_chunked
tags:
- Info
description: |
Get genesis document in a paginated/chunked format to make it
easier to iterate through larger gensis structures.
parameters:
- in: query
name: chunkID
description: Sequence number of the chunk to download.
schema:
type: integer
default: 0
example: 1
responses:
"200":
description: Genesis results.
content:
application/json:
schema:
$ref: "#/components/schemas/GenesisChunkedResponse"
"500":
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/dump_consensus_state:
get:
summary: Get consensus state
@ -1894,6 +1928,35 @@ components:
properties: {}
type: object
GenesisChunkedResponse:
type: object
required:
- "jsonrpc"
- "id"
- "result"
properties:
jsonrpc:
type: string
example: "2.0"
id:
type: integer
example: 0
result:
required:
- "chunk"
- "total"
- "data"
properties:
chunk:
type: integer
example: 0
total:
type: integer
example: 1
data:
type: string
example: "Z2VuZXNpcwo="
DumpConsensusResponse:
type: object
required:


Loading…
Cancel
Save