-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathknowledge_workflow.py
More file actions
73 lines (62 loc) · 2.13 KB
/
knowledge_workflow.py
File metadata and controls
73 lines (62 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# coding=utf-8
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from common.mixins.api_mixin import APIMixin
from knowledge.serializers.knowledge_workflow import KnowledgeWorkflowActionRequestSerializer
from knowledge.serializers.knowledge_workflow import KnowledgeWorkflowActionListQuerySerializer
class KnowledgeWorkflowApi(APIMixin):
pass
class KnowledgeWorkflowVersionApi(APIMixin):
pass
class KnowledgeWorkflowActionPageApi(APIMixin):
@staticmethod
def get_request():
return KnowledgeWorkflowActionListQuerySerializer
class KnowledgeWorkflowActionApi(APIMixin):
@staticmethod
def get_request():
return KnowledgeWorkflowActionRequestSerializer
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="knowledge_id",
description="知识库id",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
class Operate(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="knowledge_id",
description="知识库id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="knowledge_action_id",
description="知识库执行id",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]