Skip to content

Commit 8b9fec1

Browse files
committed
Support the adrf action "alist" when determining if a view is a listing view.
1 parent 27ae6f2 commit 8b9fec1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drf_spectacular/openapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _is_list_view(self, serializer: Optional[_SerializerType] = None) -> bool:
144144
if is_basic_type(serializer):
145145
return False
146146
if hasattr(self.view, 'action'):
147-
return self.view.action == 'list'
147+
return self.view.action in ('list', 'alist')
148148
# list responses are "usually" only returned by GET
149149
if self.method != 'GET':
150150
return False

0 commit comments

Comments
 (0)