62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
{
|
|
"task_id": "task_create_api_quizzes_submit",
|
|
"entity_id": "api_quizzes_submit",
|
|
"generated_at": "2025-12-18T01:57:52.723196",
|
|
"workflow_version": "v001",
|
|
"target": {
|
|
"type": "api",
|
|
"definition": {
|
|
"id": "api_quizzes_submit",
|
|
"path": "/api/quizzes/:taskId/submit",
|
|
"method": "POST",
|
|
"description": "Submit quiz answers",
|
|
"file_path": "app/api/quizzes/[taskId]/submit/route.ts",
|
|
"status": "PENDING",
|
|
"auth_required": true,
|
|
"request_body": {
|
|
"answers": "object (question_id -> answer mapping)"
|
|
},
|
|
"responses": [
|
|
{
|
|
"status": 200,
|
|
"description": "Success",
|
|
"schema": {
|
|
"score": "integer (0-100)",
|
|
"passed": "boolean",
|
|
"points_earned": "integer",
|
|
"new_balance": "integer"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"related": {
|
|
"models": [],
|
|
"apis": [],
|
|
"components": []
|
|
},
|
|
"dependencies": {
|
|
"entity_ids": [],
|
|
"definitions": []
|
|
},
|
|
"files": {
|
|
"to_create": [
|
|
"app/api/quizzes/taskId/submit/route.ts"
|
|
],
|
|
"reference": []
|
|
},
|
|
"acceptance": [
|
|
{
|
|
"criterion": "POST /api/quizzes/:taskId/submit returns success response",
|
|
"verification": "curl -X POST /api/quizzes/:taskId/submit"
|
|
},
|
|
{
|
|
"criterion": "Request validation implemented",
|
|
"verification": "Test with invalid data"
|
|
},
|
|
{
|
|
"criterion": "Error responses match contract",
|
|
"verification": "Test error scenarios"
|
|
}
|
|
]
|
|
} |