Swagger API Docs fix: Add the base DRF Serializer as the serializer class for course_groups views that don't specify one.

This commit is contained in:
Alex Dusenbery
2018-12-07 12:05:30 -05:00
committed by Alex Dusenbery
parent 9866b045c0
commit 59915d24d3

View File

@@ -21,6 +21,7 @@ from opaque_keys.edx.keys import CourseKey
from rest_framework import status, permissions
from rest_framework.generics import GenericAPIView
from rest_framework.response import Response
from rest_framework.serializers import Serializer
from six import text_type
from courseware.courses import get_course, get_course_with_access
@@ -430,6 +431,7 @@ class APIPermissions(GenericAPIView):
SessionAuthenticationAllowInactiveUser,
)
permission_classes = (permissions.IsAuthenticated, permissions.IsAdminUser)
serializer_class = Serializer
class CohortSettings(DeveloperErrorViewMixin, APIPermissions):
@@ -498,7 +500,6 @@ class CohortHandler(DeveloperErrorViewMixin, APIPermissions):
* user_partition_id: The integer identified of the UserPartition.
* group_id: The integer identified of the specific group in the partition.
"""
def get(self, request, course_key_string, cohort_id=None):
"""
Endpoint to get either one or all cohorts.