Skip to content

Commit

Permalink
Update openapi spec
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Zhang <[email protected]>
  • Loading branch information
jimthematrix committed Mar 9, 2022
1 parent 4c661d1 commit 0b0c834
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions openapi/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,30 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/chaininfo"
/blocks/{blockNumber}:
/blocks/{blockNumberOrHash}:
get:
summary: "Query the block by number"
parameters:
- $ref: "#/components/parameters/blockNumber"
- $ref: "#/components/parameters/blockNumberOrHash"
- $ref: "#/components/parameters/channel"
- $ref: "#/components/parameters/signer"
responses:
200:
description: "Transaction retrieved"
description: "Block retrieved"
content:
application/json:
schema:
$ref: "#/components/schemas/get_block_output"
/blockByTxId/{txId}:
get:
summary: "Query the block by a transaction Id included in the block"
parameters:
- $ref: "#/components/parameters/txId"
- $ref: "#/components/parameters/channel"
- $ref: "#/components/parameters/signer"
responses:
200:
description: "Block retrieved"
content:
application/json:
schema:
Expand Down Expand Up @@ -485,6 +499,9 @@ components:
items:
type: "string"
description: "Parameters to pass to the chaincode function"
strongread:
type: boolean
description: By default only the client organization's first peer is contacted for the query request; set to true to contact multiple peers in the channel
query_input_structured:
description: "Specify a JSON schema in the headers, so that the 'args' property can be specified as a JSON object"
type: "object"
Expand All @@ -497,6 +514,9 @@ components:
args:
type: "object"
description: "JSON structure for the parameters to pass to the chaincode function"
strongread:
type: boolean
description: By default only the client organization's first peer is contacted for the query request; set to true to contact multiple peers in the channel
webhook_info:
type: "object"
properties:
Expand Down Expand Up @@ -929,9 +949,10 @@ components:
in: "query"
schema:
type: "string"
blockNumber:
blockNumberOrHash:
description: block number or block hash
required: true
name: blockNumber
name: blockNumberOrHash
in: path
schema:
type: string

0 comments on commit 0b0c834

Please sign in to comment.