docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This criteria evaluates how well the engineer uses koa-route's parameter extraction capabilities to build a URL shortener API. The focus is on correctly using route.get(), route.post(), route.delete() with path patterns containing parameters, and properly handling extracted parameters in route handlers.",
"type": "weighted_checklist",
"checklist": [
{
"name": "GET route with parameter",
"description": "Uses route.get() with a path pattern like '/:shortCode' to define the redirect endpoint, correctly extracting the shortCode parameter from the URL path",
"max_score": 25
},
{
"name": "GET stats route",
"description": "Uses route.get() with path pattern '/stats/:shortCode' to define the statistics endpoint, correctly extracting the shortCode parameter",
"max_score": 20
},
{
"name": "DELETE route with parameter",
"description": "Uses route.delete() (or route.del()) with path pattern '/links/:shortCode' to define the delete endpoint, correctly extracting the shortCode parameter",
"max_score": 20
},
{
"name": "POST route definition",
"description": "Uses route.post() to define the /shorten endpoint for creating short links",
"max_score": 10
},
{
"name": "Parameter usage in handlers",
"description": "Route handlers correctly receive and use the extracted parameters (e.g., (ctx, shortCode) => {...}) according to koa-route's handler signature where parameters follow the ctx argument",
"max_score": 25
}
]
}