How to make json-schema to allow one but not another field?
Is it possible to make jsonschema to have only one of two fields. For example, image if I want to have a JSON with ether start_dt or end_dt but not both of them at the same time. like this: OK { "name": "foo", "start_dt": "2012-10-10" } OK { "name": "foo", "end_dt": "2012-10-10" } NOT OK { "name": "foo", "start_dt": "2012-10-10" "end_dt": "2013-11-11" } What should I add to the schema: { "title": "Request Schema", "type": "object", "properties": { "name": { "type": "string" }, "start_dt": { "type": "string", "format": "date" }, "end_dt": { "type": "string", "format": "date" } } } You can