From dc740e5a7d1866b44ba8ce971b9447e97436d014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20L=C3=A1zaro?= Date: Sun, 7 Jul 2024 18:57:58 -0300 Subject: [PATCH] Correction in the Swagger documentation for the getBlockByHash function - QueryQSCC Handler: hashBytes, err := hex.DecodeString(hash), passed as a parameter to the chaincode.QueryGateway function, assigned to the result. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matheus Lázaro --- ccapi/docs/swagger.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/ccapi/docs/swagger.yaml b/ccapi/docs/swagger.yaml index 074cb7b..ca2113b 100644 --- a/ccapi/docs/swagger.yaml +++ b/ccapi/docs/swagger.yaml @@ -947,6 +947,42 @@ paths: - application/json produces: - application/json + /{channelName}/qscc/getBlockByHash: + get: + summary: Get block by hash + description: Retrieves a block by its hash from the specified channel. + tags: + - Blockchain + security: + - basicAuth: [] + parameters: + - name: channelName + in: path + required: true + schema: + type: string + example: mainchannel + description: Name of the channel. + - name: hash + in: query + required: true + schema: + type: string + example: dbd2b14fb3d61b7aeac3add76f99cd9b47850c7c95ca5e489696a6b543fc6b2d + description: The hash of the block to be retrieved. + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: object + "400": + description: Bad request + "404": + description: Block not found + "500": + description: Internal server error /{channelName}/qscc/getChainInfo: get: summary: Get chain info