brandur / json_schema

A JSON Schema V4 and Hyperschema V4 parser and validator.
MIT License
230 stars 45 forks source link

Expose data on ValidationError #36

Closed greysteil closed 8 years ago

greysteil commented 8 years ago

We're exposing error messages from JSON schema publicly in our API, and don't want to expose the format in https://github.com/brandur/json_schema/pull/32. Instead, it would be great to have access to the data to which the error belongs, so we can construct our own error messages. This PR makes that so.

brandur commented 8 years ago

@greysteil Looks good! I left a minor comment, but this is okay to bring in. Thanks for adding the comprehensive test suite as well.

greysteil commented 8 years ago

@brandur - updated. Looks like Ruby 2.2 switches from RFC2396 to RFC3986 for URI parsing, so I had to update that example. Probably a good thing.

brandur commented 8 years ago

@brandur - updated. Looks like Ruby 2.2 switches from RFC2396 to RFC3986 for URI parsing, so I had to update that example. Probably a good thing.

Oh, interesting! Thanks for taking a look at that.

brandur commented 8 years ago

Released as 0.9.0.

greysteil commented 8 years ago

:heart: