Skip to content

Commit

Permalink
fix(openapi): add missing txmonitor hastx path param (#194)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
  • Loading branch information
wolf31o2 authored Jun 15, 2024
1 parent 594c8f5 commit 24d9474
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions internal/api/localtxmonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24d9474

Please sign in to comment.