There's no way to define conditional fields directly. What you can do is build a schema that's built of several schemas, using keywords like 'allOf', 'oneOf', 'anyOf' and 'not', to build sub-cases for the conditions. By doing that, you can say, for example, that if field X is defined, then fields Y and Z are required, whereas in other cases they are optional.
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓