add possibility to define expected bool value
jsval is Validator toolset, aimed to be used with JSON Schema, and expected isn't part of JSON Schema, so .. hmm.
I'm not saying this library should not implement anything outside of JSON Schema, but because, for example, auto-generation of validators is a big part of this library, we need to think about and document anything that is not naturally implied by JSON Schema.
Can you please provide in your PR:
- Document what the status of this feature is in relation to JSON schema (and/or possibly implement an extension to the schema definition)
- Document What the status of this feature with regards to schema → validator generation (and/or possibly modify the generator to handle this)
- Tests that actually exercises this feature.
If it's well defined, I think it's okay to extend what sort of JSON Schema variant we use. Perhaps we could borrow from Swagger if there exists an equivalent. However, my general inclination is that in order for us to add something that's not in the JSON Schema spec, it must be very well defined, and we must make it possible to automatically generate schemas that use such features by extending JSON Schema.