MCPcopy Index your code
hub / github.com/json-editor/json-editor / resolve

Function resolve

docs/scripts/ajv-validator.js:1866–1873  ·  view source on GitHub ↗
(root, // information about the root schema for the current schema
                             ref // reference to resolve
            )

Source from the content-addressed store, hash-verified

1864// resolve and compile the references ($ref)
1865// TODO returns AnySchemaObject (if the schema can be inlined) or validation function
1866 function resolve(root, // information about the root schema for the current schema
1867 ref // reference to resolve
1868 ) {
1869 let sch;
1870 while (typeof (sch = this.refs[ref]) == "string")
1871 ref = sch;
1872 return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
1873 }
1874// Resolve schema, its root and baseId
1875 function resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it
1876 ref // reference to resolve

Callers 1

Calls 4

assignFunction · 0.85
serializeFunction · 0.85
resolveComponentsFunction · 0.85
parseFunction · 0.85

Tested by

no test coverage detected