har-validator
Advanced tools
Comparing version 1.4.0 to 1.5.0
{ | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"name": "har-validator", | ||
@@ -4,0 +4,0 @@ "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema", |
'use strict' | ||
var schemas = require('./schemas') | ||
var validator = require('is-my-json-valid') | ||
var schemas = require('./schemas.json') | ||
@@ -13,2 +13,30 @@ function ValidationError (errors) { | ||
// is-my-json-valid does not provide meaningful error messages for external schemas | ||
// this is a workaround | ||
schemas.cache.properties.beforeRequest = schemas.cacheEntry | ||
schemas.cache.properties.afterRequest = schemas.cacheEntry | ||
schemas.page.properties.pageTimings = schemas.pageTimings | ||
schemas.request.properties.cookies.items = schemas.cookie | ||
schemas.request.properties.headers.items = schemas.record | ||
schemas.request.properties.queryString.items = schemas.record | ||
schemas.request.properties.postData = schemas.postData | ||
schemas.response.properties.cookies.items = schemas.cookie | ||
schemas.response.properties.headers.items = schemas.record | ||
schemas.response.properties.content = schemas.content | ||
schemas.entry.properties.request = schemas.request | ||
schemas.entry.properties.response = schemas.response | ||
schemas.entry.properties.cache = schemas.cache | ||
schemas.entry.properties.timings = schemas.timings | ||
schemas.log.properties.creator = schemas.creator | ||
schemas.log.properties.browser = schemas.creator | ||
schemas.log.properties.pages.items = schemas.page | ||
schemas.log.properties.entries.items = schemas.entry | ||
schemas.har.properties.log = schemas.log | ||
var runner = function (schema, data, cb) { | ||
@@ -39,3 +67,3 @@ var validate = validator(schema, { | ||
module.exports = function (data, cb) { | ||
return runner(schemas.log, data, cb) | ||
return runner(schemas.har, data, cb) | ||
} | ||
@@ -42,0 +70,0 @@ |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
19973
21
511
1