Commit 6a99ef21 by Frank Sachsenheim Committed by Sébastien Eustace

Fixes error messages that point to list items (#1408)

parent 04221f8d
...@@ -31,7 +31,9 @@ def validate_object(obj, schema_name): # type: (dict, str) -> List[str] ...@@ -31,7 +31,9 @@ def validate_object(obj, schema_name): # type: (dict, str) -> List[str]
for error in validation_errors: for error in validation_errors:
message = error.message message = error.message
if error.path: if error.path:
message = "[{}] {}".format(".".join(error.path), message) message = "[{}] {}".format(
".".join(str(x) for x in error.absolute_path), message
)
errors.append(message) errors.append(message)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment