diff --git a/openapi.py b/openapi.py index d5578ca..dbd2e75 100644 --- a/openapi.py +++ b/openapi.py @@ -10,7 +10,9 @@ from pantos.servicenode.restapi import _BidSchema from pantos.servicenode.restapi import _BidsSchema +from pantos.servicenode.restapi import _TransferResponseSchema from pantos.servicenode.restapi import _TransferSchema +from pantos.servicenode.restapi import _TransferStatusResponseSchema from pantos.servicenode.restapi import _TransferStatusSchema from pantos.servicenode.restapi import flask_app @@ -24,7 +26,8 @@ template = spec.to_flasgger( flask_app, definitions=[ - _BidSchema, _BidsSchema, _TransferSchema, _TransferStatusSchema + _BidSchema, _BidsSchema, _TransferSchema, _TransferResponseSchema, + _TransferStatusSchema, _TransferStatusResponseSchema ]) swagger = Swagger(flask_app, template=template, parse=True) diff --git a/pantos/servicenode/restapi.py b/pantos/servicenode/restapi.py index f1ae2e7..61fd556 100644 --- a/pantos/servicenode/restapi.py +++ b/pantos/servicenode/restapi.py @@ -362,7 +362,8 @@ def get(self, task_id: str) -> flask.Response: exc_info=True) internal_server_error() - response = _TransferStatusResponseSchema().load({ + # response = _TransferStatusResponseSchema().load({ + return ok_response({ 'task_id': str(task_id_uuid), 'source_blockchain_id': find_transfer_response.source_blockchain. value, @@ -383,7 +384,7 @@ def get(self, task_id: str) -> flask.Response: 'transaction_id': '' if find_transfer_response.transaction_id is None else find_transfer_response.transaction_id }) - return response + # return response class _Bids(flask_restful.Resource):