I wanted json filed not to allow null as a valid value for it. Tried to use the keyword no , but no luck.
You want the bottom json to be checked as false, as the stats field as null.
{ "stats": "null" }
please find my circuit below: -
{ "$schema": "http://json-schema.org/draft-04/schema#", "id": "http://jsonschema.net#", "type": "object", "additionalProperties": false, "maxProperties": 1, "properties": { "stats": { "id": "http://jsonschema.net/stats#", "type": "string", "maxLength": 5, "minLength": 2, "additionalProperties": false, "maxProperties": 1, "not": {"type": "null"} } }, "required": [ "stats" ] }
Although I gave "not": {"type": "null"} , it still passed the test successfully.
source share