tlivings/enjoi — pull request #3 by MattiSG (2014-11-24 17:18:32+00:00)
Title: `required` property is ignored outside of objects

A schema specifying the property is `required` passes validation even if it is `undefined`.

It is pretty clear from the code that `required` is walked only within `resolveproperties`, which is called only for objects.

This PR only adds a test demonstrating the bug. Unfortunately, the architecture of this module is not documented and I don't feel like I understand it enough to offer a PR that would both fix the problem and be likely to be merged.