Skip to content

Commit

Permalink
Merge pull request #385 from edx/schen/ECOM-5729
Browse files Browse the repository at this point in the history
Add swagger comments for the get call view as well
  • Loading branch information
schenedx authored Oct 17, 2016
2 parents 910299d + 3d53f14 commit 94d2e54
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions course_discovery/apps/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,16 @@ class CourseViewSet(viewsets.ReadOnlyModelViewSet):
serializer_class = serializers.CourseWithProgramsSerializer

def get_queryset(self):
""" List one course
---
parameters:
- name: include_deleted_programs
description: Will include deleted programs in the associated programs array
required: false
type: integer
paramType: query
multiple: false
"""
q = self.request.query_params.get('q', None)

if q:
Expand Down Expand Up @@ -301,6 +311,16 @@ def _get_partner(self):
return partner

def get_queryset(self):
""" List one course run
---
parameters:
- name: include_deleted_programs
description: Will include deleted programs in the associated programs array
required: false
type: integer
paramType: query
multiple: false
"""
q = self.request.query_params.get('q', None)
partner = self._get_partner()

Expand Down

0 comments on commit 94d2e54

Please sign in to comment.