MCPcopy
hub / github.com/json-editor/json-editor / load

Method load

src/schemaloader.js:136–140  ·  view source on GitHub ↗

* Fully loads and expands JSON schema for a provided schema object and URL. * * The callback receives a expanded JSON Schema object with references * replaced with loaded schemas. * * @param {object} schema - A JSON Schema. * @param {string} fetchUrl - Base path from which to store

(schema, fetchUrl, location)

Source from the content-addressed store, hash-verified

134 * @returns {object} A JSON Schema with references expanded.
135 */
136 async load (schema, fetchUrl, location) {
137 this.schema = schema
138 await this._asyncloadExternalRefs(schema, fetchUrl, this._getFileBase(location), true)
139 return this.expandRefs(schema)
140 }
141
142 /**
143 * Recursively expands loaded references in a provided schema.

Callers 1

loadMethod · 0.95

Calls 3

_getFileBaseMethod · 0.95
expandRefsMethod · 0.95

Tested by

no test coverage detected