feat: 格式调整2

This commit is contained in:
caoqianming 2024-09-24 12:08:05 +08:00
parent 69ff37e19a
commit 635805f041
1 changed files with 9 additions and 4 deletions

11
main.py
View File

@ -176,8 +176,9 @@ patent_patterns = [
responses={ responses={
200: { 200: {
"description": "成功示例", "description": "成功示例",
"examples": { "content": {
"application/json": { "application/json": {
"example": {
"标准号": "GB/T 1234-2020", "标准号": "GB/T 1234-2020",
"中文名称": "低热矿渣硅酸盐水泥", "中文名称": "低热矿渣硅酸盐水泥",
"英文名称": "Low-heat portland slag cement", "英文名称": "Low-heat portland slag cement",
@ -190,14 +191,18 @@ patent_patterns = [
"起草人": "张三、李四", "起草人": "张三、李四",
} }
}, },
}
}, },
400: { 400: {
'description': '错误示例', 'description': '错误示例',
"examples": { "content": {
"application/json": { "application/json": {
"example": {
"detail": "Invalid file type. Please choose 'standard' or 'patent'.", "detail": "Invalid file type. Please choose 'standard' or 'patent'.",
} }
}, }
}
} }
}, },
) )