Skip to content

Commit

Permalink
Support the adrf action "alist" when determining if a view is a listi…
Browse files Browse the repository at this point in the history
…ng view.
  • Loading branch information
tbeadle committed Oct 30, 2024
1 parent 27ae6f2 commit 8b9fec1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drf_spectacular/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _is_list_view(self, serializer: Optional[_SerializerType] = None) -> bool:
if is_basic_type(serializer):
return False
if hasattr(self.view, 'action'):
return self.view.action == 'list'
return self.view.action in ('list', 'alist')
# list responses are "usually" only returned by GET
if self.method != 'GET':
return False
Expand Down

0 comments on commit 8b9fec1

Please sign in to comment.