tdegrunt/jsonschema — pull request #21 by Acubed (2012-12-20 10:50:37+00:00)
Title: Add new Error reporting and the rewrite callback/option

Compared to your master at e7410ff2a22bae0e98a0492b9f212ed0ff98f782, this re-breaks the `$ref` schema attribute. However I considered it broken anyways, which is what #20 is all about.

This closes #19.

Before you release it there's some handful of questions to be answered:

Should this keep the same interface for the one-shot `jsonschema.validate` function? If so, there's lots more SchemaErrors that can be thrown, those would have to be caught and handled, I don't think previous versions of the library threw errors (if at all, they added errors to the list of instance errors, which isn't the same thing).

If not, should it return the complete ValidationResult object? (I'd think so, that seems pretty standard for JSON Schema libraries.) If so, then should we add a boolean `valid` property? (This could be done with a Object.defineProperty Getter I suppose.)

Some of these require tests and examples, and README updates.