From 24d94745394c97d152eeb093a6f138ff12b89e2b Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Sat, 15 Jun 2024 12:57:27 -0400 Subject: [PATCH] fix(openapi): add missing txmonitor hastx path param (#194) Signed-off-by: Chris Gianelloni --- docs/docs.go | 9 +++++++++ docs/swagger.json | 9 +++++++++ docs/swagger.yaml | 6 ++++++ internal/api/localtxmonitor.go | 5 +++-- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 3cb1871..c2609d7 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -231,6 +231,15 @@ const docTemplate = `{ "localtxmonitor" ], "summary": "Check if a particular TX exists in the mempool", + "parameters": [ + { + "type": "string", + "description": "Transaction hash (hex string)", + "name": "tx_hash", + "in": "path", + "required": true + } + ], "responses": { "200": { "description": "OK", diff --git a/docs/swagger.json b/docs/swagger.json index 459dd82..6247179 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -227,6 +227,15 @@ "localtxmonitor" ], "summary": "Check if a particular TX exists in the mempool", + "parameters": [ + { + "type": "string", + "description": "Transaction hash (hex string)", + "name": "tx_hash", + "in": "path", + "required": true + } + ], "responses": { "200": { "description": "OK", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 57af58a..b167266 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -208,6 +208,12 @@ paths: get: consumes: - application/json + parameters: + - description: Transaction hash (hex string) + in: path + name: tx_hash + required: true + type: string produces: - application/json responses: diff --git a/internal/api/localtxmonitor.go b/internal/api/localtxmonitor.go index aad3306..3cbcf7a 100644 --- a/internal/api/localtxmonitor.go +++ b/internal/api/localtxmonitor.go @@ -96,8 +96,9 @@ type responseLocalTxMonitorHasTx struct { // @Tags localtxmonitor // @Accept json // @Produce json -// @Success 200 {object} responseLocalTxMonitorHasTx -// @Failure 500 {object} responseApiError +// @Param tx_hash path string true "Transaction hash (hex string)" +// @Success 200 {object} responseLocalTxMonitorHasTx +// @Failure 500 {object} responseApiError // @Router /localtxmonitor/has_tx/{tx_hash} [get] func handleLocalTxMonitorHasTx(c *gin.Context) { // Get parameters