Comparing version 0.0.9 to 0.0.10
"use strict"; | ||
var jsv = require('JSV').JSV.createEnvironment() | ||
var jsonschema = require('jsonschema') | ||
, contentTypes = {}; | ||
@@ -63,10 +63,10 @@ | ||
} | ||
var report = jsv.validate( | ||
var errors = jsonschema.validate( | ||
req.body, | ||
contentTypes[mime] | ||
); | ||
if (report.errors.length > 0) { | ||
if (errors.length > 0) { | ||
res.send(400, { | ||
error: 'Body does not match schema for ' + mime, | ||
errors: report.errors | ||
errors: errors | ||
}); | ||
@@ -73,0 +73,0 @@ return; |
{ | ||
"name": "flair-doc", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Swagger-compliant REST API documentation generator", | ||
@@ -32,4 +32,4 @@ "main": "lib/index.js", | ||
"joi": "~0.3.4", | ||
"JSV": "~4.0.2" | ||
"jsonschema": "~0.3.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52529
+ Addedjsonschema@~0.3.2
+ Addedjsonschema@0.3.2(transitive)
- RemovedJSV@~4.0.2
- RemovedJSV@4.0.2(transitive)