How to use the z-schema.validate function in z-schema

To help you get started, we’ve selected a few z-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 hyperflow-wms / hyperflow / wflib / index.js View on Github external
rcl.hget("wf:"+wfId+":schemas", sigInfo.schema, function(err, sigSchema) { // retrieve schema
                if (err) { return cb(err, false); }
                ZSchema.validate(sig, JSON.parse(sigSchema), function(err, report) {
                    if (err) { return cb(err, false); }
                    //onsole.log("REPORT");
                    //onsole.log(sig);
                    //onsole.log(sigSchema);
                    //onsole.log(report);
                    cb(null, true);
                });
            });
        });
github anil614sagar / openapi2apigee / policify / validate-schema.js View on Github external
validateSchema: function (injected, schema) {
    return ZSchema.validate(injected, schema)
  },
  getLastError: function () {