JSON schema : Dependency based on value

I need to have the following validation :

  1. If isLegal is false, distribution countries should not be present
  2. If isLegal is true, distribution countries should be present

NOTE : I know that using anyOf can provide a solution but I need a solution using dependencies so that I don't have two different structure for the json schema as I'm using it to create JAVA classes and I dont want multiple classes.

Is it possible using JSON schema ? Below is the closest I've got. Here Im missing just one validation, if isLegal is true and distribution countries aren't present, it doesn't throw error

{  
    "type":"object",
    "additionalProperties":false,
    "properties":{  
        "isLegal":{  
            "type":"boolean"
        },
        "distributionCountries":{  
            "type":"array",
            "additionalItems":false,
            "minItems":1,
            "items":{  
                "type":"string",
                "enum":[  
                    "AF",
                    "AX",
                    "AL",
                    "DZ",
                    "AS",
                    "AD"
                ]
            }
        }
    },
    "dependencies":{  
        "distributionCountries":{  
            "properties":{  
                "isLegal":{  
                    "enum":[  
                        false
                    ]
                }
            }
        }
    }
}