Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(openapi): add missing txmonitor hastx path param #194

Merged
merged 1 commit into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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