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
Consider errors from earlier indices (in instances) to be better matches
Improves `best_match` and generally error messages in the presence of
`anyOf` / `oneOf` in cases where the errors are at the same level of
depth within the instance but occur earlier.
In other words:
{"anyOf": [{"items": {"const": 37}]}
now behaves like simply `{"items": {"const": 37}}`.
Closes: #1250
Copy file name to clipboardExpand all lines: CHANGELOG.rst
+6
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,9 @@
1
+
v4.22.0
2
+
=======
3
+
4
+
* Improve ``best_match`` (and thereby error messages from ``jsonschema.validate``) in cases where there are multiple *sibling* errors from applying ``anyOf`` / ``allOf`` -- i.e. when multiple elements of a JSON array have errors, we now do prefer showing errors from earlier elements rather than simply showing an error for the full array (#1250).
5
+
* (Micro-)optimize equality checks when comparing for JSON Schema equality by first checking for object identity, as ``==`` would.
0 commit comments