docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This evaluation assesses how well an engineer uses the json-schema-traverse package to implement a function that collects all schema objects from a JSON Schema document using depth-first pre-order traversal. The focus is exclusively on proper usage of the json-schema-traverse API.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import traverse function",
"description": "Correctly imports the traverse function from json-schema-traverse package (e.g., `const traverse = require('json-schema-traverse')` or equivalent ES6 import)",
"max_score": 10
},
{
"name": "Use traverse function",
"description": "Calls the traverse function with the input schema as the first argument",
"max_score": 20
},
{
"name": "Provide callback function",
"description": "Passes a callback function to traverse either as options.cb or as second parameter (legacy API), enabling collection of schemas during traversal",
"max_score": 25
},
{
"name": "Collect schemas correctly",
"description": "Callback function receives the schema parameter (first parameter) and pushes/stores each visited schema object into a collection array",
"max_score": 25
},
{
"name": "Return collected schemas",
"description": "Returns the array of collected schemas after traversal completes, preserving the depth-first pre-order visit sequence",
"max_score": 20
}
]
}