or run

npx @tessl/cli init
Log in

Version

Files

docs

index.md
tile.json

rubric.jsonevals/scenario-6/

{
  "context": "This criteria evaluates how well the engineer uses json-schema-traverse to traverse JSON Schemas, with specific focus on using the legacy API (v0.3.1 callback signature) where the callback is passed directly as the second parameter rather than in an options object.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports traverse function",
      "description": "The code correctly imports or requires the json-schema-traverse package (e.g., const traverse = require('json-schema-traverse') or import traverse from 'json-schema-traverse')",
      "max_score": 10
    },
    {
      "name": "Uses legacy API",
      "description": "The code uses the legacy v0.3.1 callback signature by passing the callback directly as the second parameter to traverse() (e.g., traverse(schema, callback)) rather than using the options object syntax (traverse(schema, {cb: callback}))",
      "max_score": 40
    },
    {
      "name": "Accesses jsonPtr parameter",
      "description": "The callback function correctly accesses the jsonPtr (JSON Pointer) parameter, which is the second parameter in the callback signature: (schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) => {...}",
      "max_score": 25
    },
    {
      "name": "Collects all paths",
      "description": "The implementation collects paths from all schema objects visited during traversal, including the root schema (empty string path) and all nested schemas",
      "max_score": 15
    },
    {
      "name": "Returns sorted array",
      "description": "The function returns the collected paths as an array sorted alphabetically as specified in the requirements",
      "max_score": 10
    }
  ]
}