diff --git a/apps/dataset/serializers/document_serializers.py b/apps/dataset/serializers/document_serializers.py index 677251eae40..80cfdccbe10 100644 --- a/apps/dataset/serializers/document_serializers.py +++ b/apps/dataset/serializers/document_serializers.py @@ -143,6 +143,18 @@ def get_request_params_api(): required=True, description='知识库id'), ] + @staticmethod + def get_request_body_api(): + return openapi.Schema( + type=openapi.TYPE_OBJECT, + required=['source_url_list'], + properties={ + 'source_url_list': openapi.Schema(type=openapi.TYPE_ARRAY, title="文档地址列表", description="文档地址列表", + items=openapi.Schema(type=openapi.TYPE_STRING)), + 'selector': openapi.Schema(type=openapi.TYPE_STRING, title="选择器", description="选择器") + } + ) + class DocumentInstanceSerializer(ApiMixin, serializers.Serializer):