From 7a8e9fc3de6a429201d6fb01450fe2bad5896310 Mon Sep 17 00:00:00 2001 From: jacekv Date: Thu, 14 Nov 2024 11:38:55 +0100 Subject: [PATCH] PAN-2338: Added properties to openapi docs --- pantos/servicenode/restapi.py | 49 ++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/pantos/servicenode/restapi.py b/pantos/servicenode/restapi.py index 59b6510..a5e761f 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: @@ -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: