jsonSchema attribute conditionally required

Depending on your situation, there are a few different approaches. I can think of four different ways to conditionally require a field. Dependencies The dependencies keyword is a conditional variation of the required keyword. Foreach property in dependencies, if the property is present in the JSON being validated, then the schema associated with that key … Read more