Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
readOnly: false,
writeOnly: false,
contentEncoding: 'base64',
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');
function validateJsonObjectJS(schema, input)
{
var report = mod_jsonschema.validate(input, schema);
if (report.errors.length === 0)
return (null);
/* Currently, we only do anything useful with the first error. */
var error = report.errors[0];
/* The failed property is given by a URI with an irrelevant prefix. */
var propname = error['property'];
var reason = error['message'].toLowerCase();
var i, j;
/*
* There's at least one case where the property error message is
* confusing at best. We work around this here.
*/
function validateJsonObjectJS(schema, input)
{
var report = mod_jsonschema.validate(input, schema);
if (report.errors.length === 0)
return (null);
/* Currently, we only do anything useful with the first error. */
var error = report.errors[0];
/* The failed property is given by a URI with an irrelevant prefix. */
var propname = error['property'];
var reason = error['message'].toLowerCase();
var i, j;
/*
* There's at least one case where the property error message is
* confusing at best. We work around this here.
*/
value: function(id){
if(facetPrototype.save){
facetPrototype.save.call(this, source);
}
var validation = validate(this, facetSchema);
var instance = this;
for(var i in this){
if(this.hasOwnProperty(i)){
transfer(this[i]);
}
}
for (var i in source){
if(source.hasOwnProperty(i) && !this.hasOwnProperty(i)){
transfer(undefined);
}
}
mustBeValid(validation);
if(transaction){
var newIndex = transaction.newInstances && transaction.newInstances.indexOf(instance);
}
try{
properties: {
pspid: {
type: 'string',
required: true
},
pswd: {
type: 'string',
required: true
},
userid: {
type: 'string',
required: true
}
}
}, true);
var result = JSONSchema.validate(json, schema);
if (!result.valid) throw new Error(result.errors);
this.query = Object.clone(json) || {};
this.url = url;
this.parser = new xml2js.Parser(xml2js.defaults['0.1']);
}