diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/res/resources/urls.py | 3 | ||||
-rw-r--r-- | res/res/samples/views.py | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/res/res/resources/urls.py b/res/res/resources/urls.py index d7f8297..d04ca53 100644 --- a/res/res/resources/urls.py +++ b/res/res/resources/urls.py @@ -13,7 +13,6 @@ # limitations under the License. from django.conf.urls import url -from rest_framework.urlpatterns import format_suffix_patterns from res.resources import views @@ -27,5 +26,3 @@ urlpatterns = [ url(r'^api/vnfres/v1/(?P<vnfInstanceId>[0-9a-zA-Z\-\_]+)/cps$', views.getCps.as_view(), name='get_cps'), url(r'^api/vnfres/v1/(?P<vnfInstanceId>[0-9a-zA-Z\-\_]+)/volumes$', views.getVolumes.as_view(), name='get_volumes'), ] - -urlpatterns = format_suffix_patterns(urlpatterns) diff --git a/res/res/samples/views.py b/res/res/samples/views.py index 5162f23..64ec60f 100644 --- a/res/res/samples/views.py +++ b/res/res/samples/views.py @@ -14,6 +14,8 @@ import logging +from drf_yasg.utils import swagger_auto_schema +from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response @@ -21,6 +23,9 @@ logger = logging.getLogger(__name__) class SampleList(APIView): - def get(self, request, format=None): + @swagger_auto_schema( + responses={ + status.HTTP_200_OK: 'Successfully'}) + def get(self, request): logger.debug("get") return Response({"status": "active"}) |