Skip to content

Commit

Permalink
feat: openapi specs
Browse files Browse the repository at this point in the history
  • Loading branch information
notanatol committed Mar 12, 2024
1 parent e70abdd commit 2eee5d4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openapi/SwarmCommon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,12 @@ components:
walletAddress:
$ref: "#/components/schemas/EthereumAddress"

WalletTxResponse:
type: object
properties:
transactionHash:
$ref: "#/components/schemas/TransactionHash"

RedistributionStatusResponse:
type: object
properties:
Expand Down
35 changes: 35 additions & 0 deletions openapi/SwarmDebug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2eee5d4

Please sign in to comment.