diff --git a/pantos/servicenode/restapi.py b/pantos/servicenode/restapi.py index 59b6510..f0bf7e0 100644 --- a/pantos/servicenode/restapi.py +++ b/pantos/servicenode/restapi.py @@ -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: @@ -243,7 +244,7 @@ def post(self) -> flask.Response: items: type: string example: "[bid has been rejected by service node: \ - 'bid not accepted']" +'bid not accepted']" 409: description: Sender nonce from transfer request is not unique content: @@ -301,25 +302,33 @@ 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: @@ -377,7 +386,7 @@ class _Bids(flask_restful.Resource): def get(self) -> flask.Response: """ Endpoint that returns a list of bids for a given source and \ - destination blockchain. +destination blockchain. --- parameters: - in: query @@ -396,7 +405,7 @@ def get(self) -> flask.Response: responses: 200: description: List of bids for a given source and \ - destination blockchain +destination blockchain content: application/json: schema: