How to get a flat list of validation errors?

7 views
Skip to first unread message

Erik Brakkee

unread,
Jul 26, 2022, 9:03:00 AM7/26/22
to Eve REST Framework
Hi, 

I have added  line number information to a parsed document using __line__ attributes. Now, when I get errors I would like to show the user the document path and the line number as well as the error message and the path to the schema that is violated. 

Right now, I am doing some login on the errors attribute of the validator to obtain the document path and message. I have tried to look at the document_error_tree but that one seems to contain the same validation error many times with different paths. Basically, it contains the same error for  the root and all intermediate nodes leading up to the node that is giving the error. 

Is there a way, to easily retrieve just a list of validation errors with their most specific information?

Cheers
  Erik
Reply all
Reply to author
Forward
0 new messages