Json schema. How to validate property keys based of another property value?
<p>Data: </p>

<pre><code>{
   "languages": ['en', 'ch'],
   "file": {
      "en": "file1",
      "ch": "file2"
    }
}
</code></pre>

<p>How to define a schema that verifies name of keys in file property by "languages" property?</p>

<pre><code>{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "",
  "type": "object",
  "properties": {
    "languages": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "file": {
      "type": "object",
      "properties": ????
    }
}
</code></pre>