doc: CustomListmixin添加注释
This commit is contained in:
parent
d5d4c67527
commit
8c238e90b7
|
@ -175,11 +175,17 @@ class BulkDestroyModelMixin(DestroyModelMixin):
|
|||
return Response(status=204)
|
||||
|
||||
class CustomListModelMixin(ListModelMixin):
|
||||
|
||||
@swagger_auto_schema(manual_parameters=[
|
||||
openapi.Parameter(name="query", in_=openapi.IN_QUERY, description="定制返回数据",
|
||||
type=openapi.TYPE_STRING, required=False),
|
||||
])
|
||||
def list(self, request, *args, **kwargs):
|
||||
"""
|
||||
获取列表
|
||||
|
||||
获取列表
|
||||
"""
|
||||
queryset = self.filter_queryset(self.get_queryset())
|
||||
|
||||
page = self.paginate_queryset(queryset)
|
||||
|
|
Loading…
Reference in New Issue