json-tools/json-schema

Error message returned with OneOfNoneSucceed does not include the details of what failed within that oneOf branch

avh4 opened this issue · 2 comments

avh4 commented

I am currently looking at a test where I just made some schema changes, and now I am (correctly) getting a schema validation failure, but the error message is not helpful because it doesn't give info about why each branch in my oneOf failed:

    Problem at ``
    
      * OneOfNoneSucceed

It would be great if OneOfNoneSucceed could include info about why each of the branches failed.

1602 commented

Thanks for highlighting this issue, I've made an attempt to improve oneOf validation message by including validation results of each branch. It seems a bit bulky to me though. What do you think of this API change?

1602 commented

Hey @avh4 have you got any chance to look into proposed API change to address this issue?