From 70efddf1386673d4437676e91201ce057e88e7b0 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 12 Jun 2024 22:45:52 +0300 Subject: [PATCH 1/2] SP-16044: Add get transactions by tag endpoint --- index.yml | 2 ++ p-transaction.yml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/index.yml b/index.yml index a8ac101..53a4b58 100644 --- a/index.yml +++ b/index.yml @@ -36,6 +36,8 @@ paths: $ref: "./p-transaction.yml#/paths/~1transaction~1{transactionId}~1file" /api/v2/tag/{tagId}: $ref: "./p-transaction.yml#/paths/~1tag~1{tagId}" + /api/v2/tag/{tagId}/transactions: + $ref: "./p-transaction.yml#/paths/~1tag~1{tagId}~1transactions" /api/ping: $ref: "./p-ping.yml#/paths/~1ping" diff --git a/p-transaction.yml b/p-transaction.yml index 198d509..14132f6 100644 --- a/p-transaction.yml +++ b/p-transaction.yml @@ -178,9 +178,47 @@ paths: description: "Bad request. Check your input data." "403": description: "Bad license. Either server or request does not contain valid license." + /tag/{tagId}/transactions: + get: + parameters: + - in: path + name: tagId + schema: + type: integer + format: uuid + required: true + description: Tag id + summary: Get transactions by tag + tags: + - transaction + responses: + "200": + description: "Transactions list by tag" + content: + application/json: + schema: + $ref: '#/components/schemas/GetTransactionsByTagResponse' + "400": + description: "Bad request. Check your input data." + "403": + description: "Bad license. Either server or request does not contain valid license." components: schemas: + GetTransactionsByTagResponse: + type: object + properties: + id: + type: integer + format: uuid + description: "Transaction id" + state: + type: integer + description: "Transaction status" + updatedAt: + type: string + format: 'date-time' + description: "Last time updated" TransactionProcessGetResponse: type: object properties: From 0e450ec9b2926bba11a92600abaa44e5eef717ed Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 13 Jun 2024 10:16:32 +0300 Subject: [PATCH 2/2] SP-16044: Add get transactions by tag endpoint --- p-transaction.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/p-transaction.yml b/p-transaction.yml index 14132f6..1d6ff51 100644 --- a/p-transaction.yml +++ b/p-transaction.yml @@ -197,7 +197,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GetTransactionsByTagResponse' + $ref: '#/components/schemas/ListTransactionsByTagResponse' "400": description: "Bad request. Check your input data." "403": @@ -205,6 +205,10 @@ paths: components: schemas: + ListTransactionsByTagResponse: + type: array + items: + $ref: '#/components/schemas/GetTransactionsByTagResponse' GetTransactionsByTagResponse: type: object properties: