Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
fix: swagger_auto_schema applied twice error (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
irtazaakram committed Oct 5, 2023
1 parent 1687759 commit b4cda26
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions registrar/apps/api/v3/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
import logging

from edx_api_doc_tools import query_parameter, schema_for
from edx_rest_framework_extensions.auth.jwt.authentication import (
JwtAuthentication,
)
Expand All @@ -20,24 +19,7 @@

logger = logging.getLogger(__name__)

SCHEMA_COMMON_RESPONSES = {
401: 'User is not authenticated.',
405: 'HTTP method not supported on this path.'
}


@schema_for(
'get',
parameters=[
query_parameter('org_key', str, 'Organization filter'),
query_parameter('user_has_perm', str, 'Permission filter'),
],
responses={
403: 'User lacks access to organization.',
404: 'Organization does not exist.',
**SCHEMA_COMMON_RESPONSES,
},
)

class ProgramListPaginationView(ProgramListView, TrackViewMixin, ListAPIView):
"""
A view for listing program objects.
Expand Down

0 comments on commit b4cda26

Please sign in to comment.