Skip to content

Commit 0bf1f7f

Browse files
committed
fix: standardize field name from TxID to Txid in RequestForeignGASPNode models and handlers
1 parent 4bfd006 commit 0bf1f7f

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

api/openapi/paths/non_admin/request-bodies.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ components:
4343
type: object
4444
required:
4545
- graphID
46-
- txID
46+
- txid
4747
- outputIndex
4848
properties:
4949
graphID:
5050
type: string
51-
description: The graph ID in the format of "txID.outputIndex"
51+
description: The graph ID in the format of "txid.outputIndex"
5252
example: "0000000000000000000000000000000000000000000000000000000000000000.1"
53-
txID:
53+
txid:
5454
type: string
5555
description: The transaction ID
5656
example: "0000000000000000000000000000000000000000000000000000000000000000"

pkg/server/internal/ports/openapi/openapi_api.gen.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/server/internal/ports/openapi/openapi_non_admin_request_types.gen.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/server/internal/ports/request_foreign_gasp_node_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (h *RequestForeignGASPNodeHandler) Handle(c *fiber.Ctx, params openapi.Requ
3333

3434
node, err := h.service.RequestForeignGASPNode(c.Context(), app.RequestForeignGASPNodeDTO{
3535
GraphID: body.GraphID,
36-
TxID: body.TxID,
36+
TxID: body.Txid,
3737
OutputIndex: body.OutputIndex,
3838
Topic: params.XBSVTopic,
3939
})

pkg/server/internal/ports/request_foreign_gasp_node_handler_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func TestRequestForeignGASPNodeHandler_InvalidCases(t *testing.T) {
2525
payload: openapi.RequestForeignGASPNodeBody{
2626
GraphID: testabilities.DefaultValidGraphID,
2727
OutputIndex: testabilities.DefaultValidOutputIndex,
28-
TxID: testabilities.DefaultValidTxID,
28+
Txid: testabilities.DefaultValidTxID,
2929
},
3030
headers: map[string]string{
3131
fiber.HeaderContentType: fiber.MIMEApplicationJSON,
@@ -103,7 +103,7 @@ func TestRequestForeignGASPNodeHandler_ValidCase(t *testing.T) {
103103
SetBody(openapi.RequestForeignGASPNodeBody{
104104
GraphID: testabilities.DefaultValidGraphID,
105105
OutputIndex: testabilities.DefaultValidOutputIndex,
106-
TxID: testabilities.DefaultValidTxID,
106+
Txid: testabilities.DefaultValidTxID,
107107
}).
108108
SetResult(&actualResponse).
109109
Post("/api/v1/requestForeignGASPNode")

0 commit comments

Comments
 (0)