Skip to content

Commit 44cb3eb

Browse files
committed
refactor: move OpenApiParameter definitions to schema for better organization
--bug=1064802 --user=刘瑞斌 【接口文档】/admin/api/workspace/{workspace_id}/knowledge/{knowledge_id}/document/split 接口的参数传递方式错了 https://www.tapd.cn/62980211/s/1813972
1 parent db13df5 commit 44cb3eb

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

apps/knowledge/api/document.py

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,6 @@ def get_parameters():
2020
location='path',
2121
required=True,
2222
),
23-
24-
OpenApiParameter(
25-
name="limit",
26-
description="分段长度",
27-
type=OpenApiTypes.INT,
28-
location='query',
29-
required=False,
30-
),
31-
OpenApiParameter(
32-
name="patterns",
33-
description="分段正则列表",
34-
type=OpenApiTypes.STR,
35-
location='query',
36-
required=False,
37-
),
38-
OpenApiParameter(
39-
name="with_filter",
40-
description="是否清除特殊字符",
41-
type=OpenApiTypes.BOOL,
42-
location='query',
43-
required=False,
44-
),
4523
]
4624

4725
@staticmethod
@@ -53,6 +31,18 @@ def get_request():
5331
'file': {
5432
'type': 'string',
5533
'format': 'binary' # Tells Swagger it's a file
34+
},
35+
'limit': {
36+
'type': 'integer',
37+
'description': '分段长度'
38+
},
39+
'patterns': {
40+
'type': 'string',
41+
'description': '分段正则列表'
42+
},
43+
'with_filter': {
44+
'type': 'boolean',
45+
'description': '是否清除特殊字符'
5646
}
5747
}
5848
}

0 commit comments

Comments
 (0)