z-schema 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ZSchema-browser-min.js +1 -1
- package/dist/ZSchema-browser-min.js.map +1 -1
- package/dist/ZSchema-browser-test.js +324 -267
- package/dist/ZSchema-browser.js +134 -114
- package/package.json +1 -1
- package/src/JsonValidation.js +3 -3
- package/src/Report.js +1 -0
package/package.json
CHANGED
package/src/JsonValidation.js
CHANGED
|
@@ -438,13 +438,13 @@ var recurseArray = function (report, schema, json) {
|
|
|
438
438
|
while (idx--) {
|
|
439
439
|
// equal to doesn't make sense here
|
|
440
440
|
if (idx < schema.items.length) {
|
|
441
|
-
report.path.push(idx
|
|
441
|
+
report.path.push(idx);
|
|
442
442
|
exports.validate.call(this, report, schema.items[idx], json[idx]);
|
|
443
443
|
report.path.pop();
|
|
444
444
|
} else {
|
|
445
445
|
// might be boolean, so check that it's an object
|
|
446
446
|
if (typeof schema.additionalItems === "object") {
|
|
447
|
-
report.path.push(idx
|
|
447
|
+
report.path.push(idx);
|
|
448
448
|
exports.validate.call(this, report, schema.additionalItems, json[idx]);
|
|
449
449
|
report.path.pop();
|
|
450
450
|
}
|
|
@@ -456,7 +456,7 @@ var recurseArray = function (report, schema, json) {
|
|
|
456
456
|
// If items is a schema, then the child instance must be valid against this schema,
|
|
457
457
|
// regardless of its index, and regardless of the value of "additionalItems".
|
|
458
458
|
while (idx--) {
|
|
459
|
-
report.path.push(idx
|
|
459
|
+
report.path.push(idx);
|
|
460
460
|
exports.validate.call(this, report, schema.items, json[idx]);
|
|
461
461
|
report.path.pop();
|
|
462
462
|
}
|
package/src/Report.js
CHANGED
|
@@ -136,6 +136,7 @@ Report.prototype.getPath = function (returnPathAsString) {
|
|
|
136
136
|
if (returnPathAsString !== true) {
|
|
137
137
|
// Sanitize the path segments (http://tools.ietf.org/html/rfc6901#section-4)
|
|
138
138
|
path = "#/" + path.map(function (segment) {
|
|
139
|
+
segment = segment.toString();
|
|
139
140
|
|
|
140
141
|
if (Utils.isAbsoluteUri(segment)) {
|
|
141
142
|
return "uri(" + segment + ")";
|