docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a utility that extracts all JSON Pointer paths from a JSON Schema document using schema traversal.
Create a function extractPaths that takes a JSON Schema object and returns an array of all JSON Pointer paths found in the schema.
The function should:
/**
* Extracts all JSON Pointer paths from a JSON Schema.
*
* @param {object} schema - A JSON Schema object
* @returns {string[]} Array of JSON Pointer paths, sorted alphabetically
*/
function extractPaths(schema) {
// IMPLEMENTATION HERE
}
module.exports = { extractPaths };Provides schema traversal functionality.