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

[Django 4.2]fix: swagger_auto_schema applied twice to method #552

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading