fix: swagger docs ref_name conflicts (#36189)
* fix: swagger docs ref_name conflicts * fix: swagger auto doc errors * chore: bumps openedx-learning==0.18.2 --------- Co-authored-by: Jillian Vogel <jill@opencraft.com>
This commit is contained in:
@@ -106,7 +106,7 @@ class CourseImportView(CourseImportExportViewMixin, GenericAPIView):
|
||||
# TODO: ARCH-91
|
||||
# This view is excluded from Swagger doc generation because it
|
||||
# does not specify a serializer class.
|
||||
exclude_from_schema = True
|
||||
swagger_schema = None
|
||||
|
||||
@course_author_access_required
|
||||
def post(self, request, course_key):
|
||||
|
||||
@@ -77,6 +77,11 @@ class CourseQualityView(DeveloperErrorViewMixin, GenericAPIView):
|
||||
* mode
|
||||
|
||||
"""
|
||||
# TODO: ARCH-91
|
||||
# This view is excluded from Swagger doc generation because it
|
||||
# does not specify a serializer class.
|
||||
swagger_schema = None
|
||||
|
||||
@course_author_access_required
|
||||
def get(self, request, course_key):
|
||||
"""
|
||||
|
||||
@@ -65,6 +65,11 @@ class CourseValidationView(DeveloperErrorViewMixin, GenericAPIView):
|
||||
* has_proctoring_escalation_email - whether the course has a proctoring escalation email
|
||||
|
||||
"""
|
||||
# TODO: ARCH-91
|
||||
# This view is excluded from Swagger doc generation because it
|
||||
# does not specify a serializer class.
|
||||
swagger_schema = None
|
||||
|
||||
@course_author_access_required
|
||||
def get(self, request, course_key):
|
||||
"""
|
||||
|
||||
@@ -14,7 +14,13 @@ class GradersSerializer(serializers.Serializer):
|
||||
weight = serializers.IntegerField()
|
||||
id = serializers.IntegerField()
|
||||
|
||||
class Meta:
|
||||
ref_name = "authoring_grading.Graders.v0"
|
||||
|
||||
|
||||
class CourseGradingModelSerializer(serializers.Serializer):
|
||||
""" Serializer for course grading model data """
|
||||
graders = GradersSerializer(many=True, allow_null=True, allow_empty=True)
|
||||
|
||||
class Meta:
|
||||
ref_name = "authoring_grading.CourseGrading.v0"
|
||||
|
||||
@@ -63,7 +63,7 @@ urlpatterns = [
|
||||
authoring_videos.VideoEncodingsDownloadView.as_view(), name='cms_api_videos_encodings'
|
||||
),
|
||||
re_path(
|
||||
fr'grading/{settings.COURSE_ID_PATTERN}',
|
||||
fr'grading/{settings.COURSE_ID_PATTERN}$',
|
||||
AuthoringGradingView.as_view(), name='cms_api_update_grading'
|
||||
),
|
||||
path(
|
||||
|
||||
@@ -128,6 +128,11 @@ class VideoEncodingsDownloadView(DeveloperErrorViewMixin, RetrieveAPIView):
|
||||
course_key: required argument, needed to authorize course authors and identify relevant videos.
|
||||
"""
|
||||
|
||||
# TODO: ARCH-91
|
||||
# This view is excluded from Swagger doc generation because it
|
||||
# does not specify a serializer class.
|
||||
swagger_schema = None
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
# TODO: probably want to refactor this to a decorator.
|
||||
"""
|
||||
@@ -151,6 +156,11 @@ class VideoFeaturesView(DeveloperErrorViewMixin, RetrieveAPIView):
|
||||
public rest API endpoint providing a list of enabled video features.
|
||||
"""
|
||||
|
||||
# TODO: ARCH-91
|
||||
# This view is excluded from Swagger doc generation because it
|
||||
# does not specify a serializer class.
|
||||
swagger_schema = None
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
# TODO: probably want to refactor this to a decorator.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user