title: JSON schema conditional dependency on value
body: <p>I know there is a similar question here, but it didn't really address my issue. In short, I want one my fields to be dependent on the other field's value. But for some values, I don't want any field to be required. Here is an example:</p>
  
  <p><strong>Schema</strong></p>
  
  <pre><code>{
    "definitions": {},
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
  
      "colour": {
        "type": "string",
        "enum": ["red", "black", "blue"]
      },
  
      "blackQuote": {
        "type": "string",
        "maxLength": 11
      },
  
      "redQuote": {
        "type": "string",
        "maxLength": 11
      }
    },
  
    "oneOf": [
        {
          "properties": {
            "colour": {"enum": ["red"]}
          },
          "required": ["redQuote"]
        },
        {
          "properties": {
            "colour": {"enum": ["black"]}
          },
          "required": ["blackQuote"]
        }
    ],
  
    "required": [
      "colour"
    ]
  }
  </code></pre>
  
  <p>This works like this: </p>
  
  <ul>
  <li>IF the colour is "red" THEN "redQuote" (but not "blackQuote") is required: this is fine</li>
  <li>IF the colour is "black" THEN "blackQuote" (but not "redQuote") is required: this is also fine</li>
  <li>BUT if I put the colour "blue" in my JSON, then the validator says that the properties "redQuote" and "blackQuote" are missing... I don't want that, I only want dependecies for "red" and "black", but if the colour is "blue" I don't want anything required. How to achieve this?</li>
  </ul>