You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tryerrors.append(.{ .path=trystack.constructPath(errors.arena.allocator()), .msg="None of anyOf valid." });
46
+
} elsereturnfalse;
47
+
}
48
+
}
49
+
50
+
if (node.get("oneOf")) |oneOf| {
51
+
std.debug.assert(oneOf==.array);
52
+
53
+
trystack.pushPath("oneOf");
54
+
deferstack.pop();
55
+
56
+
varvalid_idx: ?usize=null;
57
+
for (oneOf.array.items, 0..) |item, idx| {
58
+
trystack.pushIndex(idx);
59
+
deferstack.pop();
60
+
61
+
if (tryschema.checks(item, data, stack, null)) {
62
+
if (valid_idx) |first_valid_idx| {
63
+
if (collect_errors) |errors| {
64
+
constmsg=trystd.fmt.allocPrint(errors.arena.allocator(), "oneOf valid for more than one schemas: stopped checking after valid schemas ({}, {}).", .{ first_valid_idx, idx });
0 commit comments