Closed marcioAlmada closed 7 years ago
I've tried to use the following schema using a "not" constraint against an enum value but it seems impossible to make it fail:
{ "type": "object", "properties": { "feature_a": { "type": "boolean" }, "feature_b": { "type": "boolean" }, "feature_c": { "type": "boolean" } }, "required": [ "feature_a", "feature_b", "feature_c", ], "not": { "type": "object", "enum": [ { "feature_a": true, "feature_b": true, "feature_c": true } ] }, "additionalProperties": false }
Data:
{ "feature_a" : true, "feature_b" : true, "feature_c" : true }
What happens: Validation passes. Expected: validation should fail with message "JSON is valid against schema from 'not'."
It was easy to assert the correct behavior with http://www.jsonschemavalidator.net
I've tried to use the following schema using a "not" constraint against an enum value but it seems impossible to make it fail:
Data:
What happens: Validation passes. Expected: validation should fail with message "JSON is valid against schema from 'not'."
It was easy to assert the correct behavior with http://www.jsonschemavalidator.net