JS validation example: use toString() of validation result instead of printing the results array
Closed this issue · 1 comments
nkuehn commented
I was misled for quite a bit of time by this line in the example code:
https://github.com/raml-org/webapi-parser/blob/master/examples/js/raml10-string-validation.js#L47
It hinted that the results array ist the right place to start dumping / debugging / logging validation errors but it's only useful for programmatic access.
I suggest to just console.log the ValidationResult itself, it has a nice toString() function that is not amazing but by far enough to understand the problems reported.