voxpupuli / json-schema

Ruby JSON Schema Validator
MIT License
1.54k stars 243 forks source link

Made sure all validate methods go through the same call chain #338

Closed iainbeeston closed 8 years ago

iainbeeston commented 8 years ago

Right now when a schema is validated, we perform a different call path depending on which of the validate methods is called. Schema validation has it's own path too.

I've changed this so everything is validated via JSON::Validator#validate!, all other validate methods ultimately call that. This means that the varied validate class methods on Validator are simplified and just add or remove validation options.

RST-J commented 8 years ago

:+1: +2 actually, I like tidy code.