Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add openapi schema for dex controller #1754

Merged
merged 1 commit into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions docs/swagger_v3/dex.spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
schemas:
DexSwap:
description: DEX swap
type: object
properties:
amounts:
type: array
items:
type: integer
example: [1000050, 1000060, 1000070, 1000080]
caller:
type: string
example: "ak_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch"
from_token:
type: string
example: "TK1"
to_token:
type: string
example: "TK2"
log_idx:
type: integer
example: 0
to_account:
type: string
example: "ak_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch"
tx_hash:
type: string
example: "th_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch"
required:
- amounts
- caller
- from_token
- to_token
- log_idx
- to_account
- tx_hash
paths:
/dex/swaps:
get:
deprecated: false
description: Get DEX swap tokens
operationId: GetDexSwaps
parameters:
- $ref: '#/components/parameters/DirectionParam'
- in: query
name: caller
type: string
description: The account ID of the caller. [More info](https://github.com/aeternity/ae_mdw#generic-ids)
example: "ak_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch"
- in: query
name: from_symbol
type: string
description: DEX token
example: "TK1"
responses:
'200':
description: Returns paginatinated list of DEX swaps
content:
application/json:
schema:
allOf:
- type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/DexSwap'
- $ref: '#/components/schemas/PaginatedResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Loading