feat: 更新上传文件字段的schema,增加contentMediaType属性以支持特定文件类型

This commit is contained in:
iHeyTang 2025-08-20 11:19:08 +08:00
parent 9b3ffe70f5
commit 583848e803
1 changed files with 1 additions and 1 deletions

View File

@ -409,7 +409,7 @@ def _generate_field_schema(input_field: dict) -> dict:
)
elif field_type == "UploadFile":
field_schema.update(
{"type": "string", "format": "binary", "description": "上传文件"}
{"type": "string", "format": "binary", "contentMediaType": "image/*", "description": "上传文件"}
)
else: # string
field_schema.update({"type": "string"})