MCPcopy Create free account
hub / github.com/json-editor/json-editor / dependentSchemas

Method dependentSchemas

src/validator.js:42–54  ·  view source on GitHub ↗
(schema, value, path)

Source from the content-addressed store, hash-verified

40 return errors
41 },
42 dependentSchemas (schema, value, path) {
43 let errors = []
44
45 Object.keys(schema.dependentSchemas).forEach((key) => {
46 if (typeof value[key] !== 'undefined') {
47 const dependentSchema = schema.dependentSchemas[key]
48 const tmpErrors = this._validateSchema(dependentSchema, value, path)
49 errors = [...errors, ...tmpErrors]
50 }
51 })
52
53 return errors
54 },
55 contains (schema, value, path) {
56 const errors = []
57 let counter = 0

Callers

nothing calls this directly

Calls 1

_validateSchemaMethod · 0.95

Tested by

no test coverage detected