JSON Schema conditional required if and only if a specific key exists in nested object
问题 My question for jsonschema is twofold: Given { "foo": {"ar": {"a": "r"}}, "bar": "" } How do I check if the key "ar" exists inside of "foo"? And only if "ar" exists inside of "foo", how do I make it so that "bar" must exists inside the given json? I have tried looking other SO answers or jsonschema docs, but they only seem to check if the key has a specific value rather than if the key just exists regardless of its value. And the jsonschema for nested objects only seem to check for the