How to use the json-schema.checkPropertyChange function in json-schema

To help you get started, we’ve selected a few json-schema examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / json-schema / json-schema-tests.ts View on Github external
contentMediaType: 'text',
        else: {},
        if: {},
        then: {}
    }
    const c: JSONSchema7Definition = false;
}

// Class
class Schema7 implements JSONSchema7 {
}

let result = validate({}, { $id: 'schema-id' });
mustBeValid(result);

result = checkPropertyChange({ foo: 'bar' }, { $id: 'schema-id' }, 'foo');
github persvr / pintura / lib / facet.js View on Github external
value: function(name, value){
							var propDef = properties && properties[name];
							if(propDef){
								mustBeValid(checkPropertyChange(value, propDef, name));
								if(propDef.set){
									value = propDef.set.call(this, name, value);
								}
							}
							sourceClass.get(source.getId ? source.getId() : source.id).set(name, value);
							this[name] = value;
						},
						enumerable: false