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 0d3dccf
Show file tree
Hide file tree
Showing 2 changed files with 42 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 @@ -969,6 +969,12 @@ components:
schema:
type: string

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

parameters:

GasPriceParameter:
Expand Down
36 changes: 36 additions & 0 deletions openapi/SwarmDebug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,42 @@ paths:
$ref: "SwarmCommon.yaml#/components/responses/500"
default:
description: Default response

"/wallet/withdraw/{coin}":
get:
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 0d3dccf

Please sign in to comment.