jsonschema-rs icon indicating copy to clipboard operation
jsonschema-rs copied to clipboard

Rework errors

Open Stranger6667 opened this issue 5 years ago • 2 comments

  • [ ] Avoid lifetimes. There is already Arc inside validators, this might be a way to avoid refs to the schema.
  • [ ] Rename validate to iter_errors and add validate that will return the first error

Stranger6667 avatar Jun 13 '20 13:06 Stranger6667

I am here mainly for the second part (Owned version of errors). without this, I do not know how to wrap ValidationError within my own thiserror enum. I Can get it to work somehow, but It would be a lot of lines of code. (I am still a rust newb)

hoijui avatar Nov 03 '21 14:11 hoijui

@hoijui There is a pub(crate) to_owned function which surely could be replaced by the ToOwned implementation - though, I am not yet sure if it will be sufficient. Let me know if I can help

Stranger6667 avatar Nov 03 '21 16:11 Stranger6667