X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Flcm%2Fjobs%2Fviews.py;h=7221bf5551b40c790b3165e4934920577f240182;hb=46ad7c172411214c5432ed93fda4271288077447;hp=3da36bf82e3da3c8b268decc739bec223c071fbb;hpb=d208e615031c1ce6f4335a45b7512d246c838e4c;p=vfc%2Fgvnfm%2Fvnflcm.git diff --git a/lcm/lcm/jobs/views.py b/lcm/lcm/jobs/views.py index 3da36bf8..7221bf55 100644 --- a/lcm/lcm/jobs/views.py +++ b/lcm/lcm/jobs/views.py @@ -15,6 +15,7 @@ import logging import traceback +from drf_yasg import openapi from drf_yasg.utils import swagger_auto_schema from rest_framework import status from rest_framework.response import Response @@ -30,6 +31,13 @@ logger = logging.getLogger(__name__) class JobView(APIView): @swagger_auto_schema( + manual_parameters=[ + openapi.Parameter('responseId', + openapi.IN_QUERY, + "responseId", + type=openapi.TYPE_INTEGER + ), + ], responses={ status.HTTP_200_OK: JobQueryRespSerializer(), status.HTTP_500_INTERNAL_SERVER_ERROR: "Internal error" @@ -45,4 +53,4 @@ class JobView(APIView): return Response(data=resp_serializer.data, status=status.HTTP_200_OK) except Exception as e: logger.error(traceback.format_exc()) - return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) + return Response(data={'error': e.args[0]}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)