safety-eval-service-frontend/.api/safetyEval-question-modify-.../spec.json

101 lines
3.4 KiB
JSON
Raw Normal View History

2026-08-24 18:31:16 +08:00
{
"openapi": "3.0.1",
"info": {
"title": "编辑习题",
"description": "同步自 Apifox试题管理int64 主键按前端精度规范落为 string",
"version": "1.0.0"
},
"paths": {
"/safetyEval/question/modify": {
"post": {
"summary": "编辑习题",
"tags": ["试题管理"],
"requestBody": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/QuestionUpdateDTO" }
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/SingleResponseVoid" }
}
}
}
}
}
}
},
"components": {
"schemas": {
"QuestionUpdateDTO": {
"type": "object",
"required": ["id", "title", "score", "coursewareManagementId", "questionOptionList"],
"properties": {
"id": {
"type": "string",
"description": "试题id后端 Long前端按字符串保证精度"
},
"title": { "type": "string", "description": "题干" },
"score": {
"type": "number",
"description": "分值",
"minimum": 0.1,
"maximum": 999.9
},
"analysis": { "type": "string", "description": "答案解析" },
"tagType": { "type": "string", "description": "标签类型" },
"coursewareManagementId": {
"type": "string",
"description": "关联课件id后端 Long前端按字符串保证精度"
},
"questionOptionList": {
"type": "array",
"description": "试题选项信息",
"items": { "$ref": "#/components/schemas/QuestionOptionUpdateDTO" }
},
"source": {
"type": "integer",
"description": "来源(1:管理员添加,2:三方添加)"
}
}
},
"QuestionOptionUpdateDTO": {
"type": "object",
"required": ["isCorrect", "optionKey", "optionText"],
"properties": {
"id": {
"type": "string",
"description": "选项ID后端 Long前端按字符串保证精度已有选项回传新增选项无"
},
"questionId": {
"type": "string",
"description": "所属试题ID后端 Long前端按字符串保证精度"
},
"isCorrect": {
"type": "boolean",
"description": "是否正确答案 true 是,false 不是"
},
"optionKey": { "type": "string", "description": "选项标识A,B,C,D" },
"optionText": { "type": "string", "description": "选项内容" },
"sortOrder": { "type": "integer", "description": "选项显示顺序" }
}
},
"SingleResponseVoid": {
"type": "object",
"properties": {
"success": { "type": "boolean", "description": "是否成功" },
"code": { "type": "string", "description": "响应码" },
"message": { "type": "string", "description": "响应消息" },
"errMessage": { "type": "string", "description": "错误响应消息" },
"data": { "description": "响应数据", "type": "null" }
}
}
}
}
}