mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
31 lines
1.5 KiB
JSON
31 lines
1.5 KiB
JSON
{
|
|
"context": "Tests ability to add API endpoints to both aiservice (Django-Ninja) and cf-api (Express) with correct schemas, auth, registration, and middleware ordering",
|
|
"type": "weighted_checklist",
|
|
"checklist": [
|
|
{
|
|
"name": "Correct Django-Ninja schemas",
|
|
"description": "Defines request and response schemas using ninja.Schema with correct field types and defaults (source_code: str, language: str = 'python', cyclomatic_complexity: int, etc.)",
|
|
"max_score": 20
|
|
},
|
|
{
|
|
"name": "Async aiservice endpoint with auth",
|
|
"description": "Creates an async def endpoint using AuthenticatedRequest, with response dict mapping status codes to schemas (200 for success, 400/500 for errors)",
|
|
"max_score": 20
|
|
},
|
|
{
|
|
"name": "Aiservice URL registration",
|
|
"description": "Registers the endpoint in aiservice/urls.py with path('ai/code-complexity', code_complexity_api.urls) following the kebab-case naming convention",
|
|
"max_score": 20
|
|
},
|
|
{
|
|
"name": "Express endpoint handler",
|
|
"description": "Creates an async handler function in js/cf-api/endpoints/code-complexity.ts that accepts Request/Response and returns JSON",
|
|
"max_score": 15
|
|
},
|
|
{
|
|
"name": "CF-API route registration with middleware",
|
|
"description": "Registers the route in the protected routes section of js/cf-api/routes/index.ts (after checkForValidAPIKey, not before body parser) with trackUsage middleware",
|
|
"max_score": 25
|
|
}
|
|
]
|
|
}
|