Skip to content

Commit 767cdfc

Browse files
committed
feat: add serializer_class to Operate classes in model, module, and tool APIs
1 parent fe03282 commit 767cdfc

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

apps/models_provider/views/model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def get(self, request: Request):
6464

6565
class Operate(APIView):
6666
authentication_classes = [TokenAuth]
67+
serializer_class = ModelSerializer
6768

6869
@extend_schema(methods=['PUT'],
6970
description=_('Update model'),
@@ -101,6 +102,7 @@ def get(self, request: Request, workspace_id: str, model_id: str):
101102

102103
class ModelParamsForm(APIView):
103104
authentication_classes = [TokenAuth]
105+
serializer_class = ModelSerializer
104106

105107
@extend_schema(methods=['GET'],
106108
description=_('Get model parameter form'),
@@ -142,6 +144,7 @@ def get(self, request: Request, workspace_id: str, model_id: str):
142144

143145
class PauseDownload(APIView):
144146
authentication_classes = [TokenAuth]
147+
serializer_class = ModelSerializer
145148

146149
@extend_schema(methods=['PUT'],
147150
description=_('Pause model download'),

apps/modules/views/module.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def post(self, request: Request, workspace_id: str, source: str):
3333

3434
class Operate(APIView):
3535
authentication_classes = [TokenAuth]
36+
serializer_class = ModuleSerializer
3637

3738
@extend_schema(methods=['PUT'],
3839
description=_('Update module'),

apps/tools/views/tool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def post(self, request: Request, workspace_id: str):
3030

3131
class Operate(APIView):
3232
authentication_classes = [TokenAuth]
33+
serializer_class = ToolSerializer
3334

3435
@extend_schema(methods=['PUT'],
3536
description=_('Update tool'),

0 commit comments

Comments
 (0)