Skip to content

Commit

Permalink
PAN-2338: Added properties to openapi docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekv committed Nov 14, 2024
1 parent 0f6b813 commit 7a8e9fc
Showing 1 changed file with 28 additions and 21 deletions.
49 changes: 28 additions & 21 deletions pantos/servicenode/restapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ def post(self) -> flask.Response:
application/json:
schema:
type: object
example:
task_id: '123e4567-e89b-12d3-a456-426614174000'
properties:
task_id:
type: string
406:
description: Transfer request no accepted
content:
Expand Down Expand Up @@ -301,25 +302,31 @@ def get(self, task_id: str) -> flask.Response:
application/json:
schema:
type: object
example:
task_id: '123e4567-e89b-12d3-a456-426614174000'
source_blockchain_id: 1
destination_blockchain_id: 2
sender_address: \
'0x1234567890123456789012345678901234567890'
recipient_address: \
'0x1234567890123456789012345678901234567890'
source_token_address: \
'0x1234567890123456789012345678901234567890'
destination_token_address: \
'0x1234567890123456789012345678901234567890'
amount: 100
fee: 1
status: 'pending'
transfer_id: \
'0x1234567890123456789012345678901234567890'
transaction_id: \
'0x1234567890123456789012345678901234567890'
properties:
task_id:
type: string
source_blockchain_id:
$ref: '#/components/schemas/_Bids/properties/source_blockchain'
destination_blockchain_id:
$ref: '#/components/schemas/_Bids/properties/destination_blockchain'
sender_address:
type: string
recipient_address:
type: string
source_token_address:
type: string
destination_token_address:
type: string
amount:
type: integer
fee:
type: integer
status:
type: string
transfer_id:
type: string
transaction_id:
type: string
404:
description: 'not found'
content:
Expand Down

0 comments on commit 7a8e9fc

Please sign in to comment.