64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
{
|
|
"task_id": "task_create_api_tasks_complete",
|
|
"entity_id": "api_tasks_complete",
|
|
"generated_at": "2025-12-18T01:57:52.723026",
|
|
"workflow_version": "v001",
|
|
"target": {
|
|
"type": "api",
|
|
"definition": {
|
|
"id": "api_tasks_complete",
|
|
"path": "/api/tasks/:id/complete",
|
|
"method": "POST",
|
|
"description": "Complete a specific task",
|
|
"file_path": "app/api/tasks/[id]/complete/route.ts",
|
|
"status": "PENDING",
|
|
"auth_required": true,
|
|
"responses": [
|
|
{
|
|
"status": 200,
|
|
"description": "Success",
|
|
"schema": {
|
|
"points_earned": "integer",
|
|
"new_balance": "integer"
|
|
}
|
|
},
|
|
{
|
|
"status": 400,
|
|
"description": "Error",
|
|
"schema": {
|
|
"error": "string (task not found or already completed)"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"related": {
|
|
"models": [],
|
|
"apis": [],
|
|
"components": []
|
|
},
|
|
"dependencies": {
|
|
"entity_ids": [],
|
|
"definitions": []
|
|
},
|
|
"files": {
|
|
"to_create": [
|
|
"app/api/tasks/id/complete/route.ts"
|
|
],
|
|
"reference": []
|
|
},
|
|
"acceptance": [
|
|
{
|
|
"criterion": "POST /api/tasks/:id/complete returns success response",
|
|
"verification": "curl -X POST /api/tasks/:id/complete"
|
|
},
|
|
{
|
|
"criterion": "Request validation implemented",
|
|
"verification": "Test with invalid data"
|
|
},
|
|
{
|
|
"criterion": "Error responses match contract",
|
|
"verification": "Test error scenarios"
|
|
}
|
|
]
|
|
} |