From 2eee5d4ffbfa74d408ccaddff7928dbb731bc8a1 Mon Sep 17 00:00:00 2001 From: notanatol Date: Tue, 12 Mar 2024 12:16:25 -0600 Subject: [PATCH] feat: openapi specs --- openapi/SwarmCommon.yaml | 6 ++++++ openapi/SwarmDebug.yaml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/openapi/SwarmCommon.yaml b/openapi/SwarmCommon.yaml index eccb03e9946..61d665353af 100644 --- a/openapi/SwarmCommon.yaml +++ b/openapi/SwarmCommon.yaml @@ -697,6 +697,12 @@ components: walletAddress: $ref: "#/components/schemas/EthereumAddress" + WalletTxResponse: + type: object + properties: + transactionHash: + $ref: "#/components/schemas/TransactionHash" + RedistributionStatusResponse: type: object properties: diff --git a/openapi/SwarmDebug.yaml b/openapi/SwarmDebug.yaml index 11d7b1a5fdb..e93bd83de4a 100644 --- a/openapi/SwarmDebug.yaml +++ b/openapi/SwarmDebug.yaml @@ -689,6 +689,41 @@ paths: $ref: "SwarmCommon.yaml#/components/responses/500" default: description: Default response + "/wallet/withdraw/{coin}": + post: + summary: Allows withdrawals of BZZ or xDAI to provided (whitelisted) address + tags: + - Wallet + parameters: + - in: query + name: amount + required: true + schema: + $ref: "#/components/schemas/BigInt" + - in: query + name: address + required: true + schema: + $ref: "#/components/schemas/EthereumAddress" + - in: path + name: coin + required: true + schema: + $ref: "#/components/schemas/SwarmAddress" + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WalletTxResponse' + description: OK + "400": + $ref: "SwarmCommon.yaml#/components/responses/400" + description: Amount greater than ballance or coin is other than BZZ/xDAI + "500": + $ref: "SwarmCommon.yaml#/components/responses/500" + default: + description: Default response "/transactions": get: