Skip to content

Commit 3a6f217

Browse files
committed
fix: 修复批量导入网页地址swagger上没有填写请求体的地方的缺陷
--bug=1050206 --user=王孝刚 【github#1809】【知识库】web知识库,批量导入网页地址时,抓到的接口有请求体,但是swagger上没有填写请求体的地方。 https://www.tapd.cn/57709429/s/1628286
1 parent 06a5f6a commit 3a6f217

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

apps/dataset/serializers/document_serializers.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,18 @@ def get_request_params_api():
143143
required=True,
144144
description='知识库id'),
145145
]
146+
@staticmethod
147+
def get_request_body_api():
148+
return openapi.Schema(
149+
type=openapi.TYPE_OBJECT,
150+
required=['source_url_list'],
151+
properties={
152+
'source_url_list': openapi.Schema(type=openapi.TYPE_ARRAY, title="文档地址列表", description="文档地址列表",
153+
items=openapi.Schema(type=openapi.TYPE_STRING)),
154+
'selector': openapi.Schema(type=openapi.TYPE_STRING, title="选择器", description="选择器")
155+
}
156+
)
157+
146158

147159

148160
class DocumentInstanceSerializer(ApiMixin, serializers.Serializer):

0 commit comments

Comments
 (0)