docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"context": "Evaluates how well the solution leverages @nestjs/mongoose factories and decorators to turn the catalog classes into both a runtime schema and a raw definition, including virtual exposure. Checks focus solely on correct use of SchemaFactory, DefinitionsFactory, and related decorators to satisfy the spec.",
"type": "weighted_checklist",
"checklist": [
{
"name": "SchemaFactory",
"description": "buildProductSchema uses SchemaFactory.createForClass(Product) (or the module’s class-to-schema factory) instead of hand-written Mongoose schemas, honoring any @Schema options applied to the Product class.",
"max_score": 20
},
{
"name": "Field decorators",
"description": "@Prop annotations (or equivalent) mark name and price as required strings/numbers, set inventoryCount default to 0, and declare tags as an array of strings so SchemaFactory carries these rules into the generated schema.",
"max_score": 20
},
{
"name": "Nested typing",
"description": "Category and Dimensions are embedded via @Prop type metadata (e.g., type: () => Category/Dimensions or raw schema type hints) so SchemaFactory outputs nested subdocuments with required title/slug and optional width/height.",
"max_score": 20
},
{
"name": "Virtual setup",
"description": "The fullTitle virtual is defined with @Virtual or schema.virtual and schema options enable JSON serialization of virtuals (e.g., @Schema({ toJSON: { virtuals: true }}) or schema.set), keeping the field non-persisted.",
"max_score": 20
},
{
"name": "DefinitionsFactory",
"description": "buildProductDefinition calls DefinitionsFactory.createForClass(Product) (or equivalent) to emit the raw definition matching the schema’s required/default/array/subdocument settings, rather than duplicating field descriptions manually.",
"max_score": 20
}
]
}