Is there a way to define conditional schema using JSONSchema. For example,
{"name":"A1",parmas":{"paramA":value1,"paramB":value2}
is valid and the following:
{"name":"A2",parmas":{"paramD":value3,"paramE":value4,"paramF":value5}
is also valid. The schema of params is dependent on what the value of the key "name" is. Is there a way to represent this using JSONSchema?
In fact, we are trying to autogenerate documentation of JSON schema using something likehttp://lbovet.github.io/typson-demo/ Any other tool to generate documentation from such a schema for a JSON object will also do. Is there any other tool to do this? We are using Voluptuous to do the validation in whihc handle this case. so the main problem is not in validation but in generating the documentation from a given JSON schema.
Thanks in advance,
Debi