docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"context": "Evaluates whether the NestJS module uses @nestjs/mongoose's built-in ObjectId pipes to validate and parse request data as required by the spec. Scoring checks that route handlers wire the correct pipe variants and propagate their outputs into controller logic and services.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Param validation",
"description": "GET `/customers/:customerId` applies `IsObjectIdPipe` to the `customerId` parameter so valid strings pass through unchanged and invalid values trigger the pipe's 400 response.",
"max_score": 25
},
{
"name": "Parsing pipe",
"description": "DELETE `/customers/:customerId/orders/:orderId` uses `ParseObjectIdPipe` for both parameters, converting them to `Types.ObjectId` before controller logic executes.",
"max_score": 35
},
{
"name": "Service receives ObjectIds",
"description": "The parsed `customerId` and `orderId` values from `ParseObjectIdPipe` are passed into `CustomersService.deleteOrder` as `Types.ObjectId` instances rather than raw strings.",
"max_score": 10
},
{
"name": "Optional query pipe",
"description": "GET `/customers` attaches `IsObjectIdPipe` (configured as optional) to the `referrerId` query so absent values skip validation, valid ObjectId strings are accepted, and invalid values cause the pipe to return 400.",
"max_score": 20
},
{
"name": "Pipe-driven errors",
"description": "All 400 responses for invalid ids rely on the built-in pipe behaviors instead of manual regex checks or custom exceptions.",
"max_score": 10
}
]
}