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 advanced path-to-regexp options to implement prefix-based routing with path capture. The focus is on using the options parameter to enable partial path matching and proper parameter extraction.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses koa-route",
"description": "Imports and uses the koa-route package (e.g., `const route = require('koa-route')`)",
"max_score": 10
},
{
"name": "Partial matching option",
"description": "Uses the `{ end: false }` option parameter with route.get() to enable prefix matching that continues beyond the specified path pattern",
"max_score": 35
},
{
"name": "Path parameter capture",
"description": "Defines route patterns with parameter syntax (e.g., `/api/v1/:path*` or similar wildcard/parameter pattern) to capture the remaining path segments",
"max_score": 25
},
{
"name": "Multiple version routes",
"description": "Creates separate route handlers for both v1 and v2 API versions using route.get() with appropriate path patterns",
"max_score": 15
},
{
"name": "Correct response format",
"description": "Handlers set ctx.body to the required JSON format with 'version' and 'path' fields containing the correct captured values",
"max_score": 15
}
]
}