From: fengyuanxing Date: Mon, 29 Jan 2018 01:53:34 +0000 (+0800) Subject: Modify the incorrect response status code X-Git-Tag: v1.1.0~61 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=24492becbf1e0b8524753d3c19856b1d79f1aa7d;p=vfc%2Fnfvo%2Fcatalog.git Modify the incorrect response status code Change-Id: I83b2a276932e10cf384ea459a30e99182516b48b Issue-ID: VFC-685 Signed-off-by: fengyuanxing --- diff --git a/catalog/packages/views.py b/catalog/packages/views.py index f89736ee..e5538915 100644 --- a/catalog/packages/views.py +++ b/catalog/packages/views.py @@ -46,7 +46,7 @@ logger = logging.getLogger(__name__) type=openapi.TYPE_STRING, pattern='CSAR(\w+) distributed successfully.')), status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response( - 'error message', + 'error', openapi.Schema( type=openapi.TYPE_STRING))}) @swagger_auto_schema( @@ -56,7 +56,7 @@ logger = logging.getLogger(__name__) responses={ status.HTTP_200_OK: NsPackagesSerializer, status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response( - 'error message', + 'error', openapi.Schema( type=openapi.TYPE_STRING))}) @api_view(http_method_names=['POST', 'GET']) @@ -99,7 +99,7 @@ def nspackages_rc(request, *args, **kwargs): responses={ status.HTTP_202_ACCEPTED: PostJobResponseSerializer, status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response( - 'error message', + 'error', openapi.Schema( type=openapi.TYPE_STRING))}) @swagger_auto_schema( @@ -109,7 +109,7 @@ def nspackages_rc(request, *args, **kwargs): responses={ status.HTTP_200_OK: NfPackagesSerializer, status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response( - 'error message', + 'error', openapi.Schema( type=openapi.TYPE_STRING))}) @api_view(http_method_names=['POST', 'GET']) @@ -229,7 +229,7 @@ def ns_model_parser(request, *args, **kwargs): responses={ status.HTTP_202_ACCEPTED: ParseNfPackageResponseSerializer, status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response( - 'error message', + 'error', openapi.Schema( type=openapi.TYPE_STRING))}) @api_view(http_method_names=['POST'])