(root, // information about the root schema for the current schema
ref // reference to resolve
)
| 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 |
no test coverage detected