title: JSON Schema: How to correctly use oneOf reference in json?
body: <p>Using the following site: <a href="http://jeremydorn.com/json-editor/" rel="nofollow noreferrer">http://jeremydorn.com/json-editor/</a> and pasting the following code in the schema part:</p>
  
  <pre><code> {
    "type": "object",
    "Title": "Pets",
  
    "definitions": {
      "petType": {
        "oneOf": [
          {
            "$ref": "#definitions/cat"
          },
          {
            "$ref": "#definitions/dog"
          }
        ]
      },
      "cat": {
        "sounds": {
          "enum": [
            "meow",
            "ghh"
          ]
         }
      },
      "dog": {
        "sounds": {
          "enum": [
            "woof",
            "grr"
          ]
        }
      }
    },
  
     "properties": {
      "productType": {
        "type": "string",
        "enum": [
          "cats",
          "dogs"
        ]
      },
  
      "sounds": {
        "type": "string",
        "enum": [
          { "$ref":"#definitions/petType" }
        ] 
      }
  
  
    }
  }
  </code></pre>
  
  <p>The goal is to have a second drop down with the matching pet sounds. But how to correctly make the reference? </p>