title: Avro Schema format Exception - "record" is not a defined name
body: <p>I'm trying to use this avro shcema</p>
  
  <pre><code>{
    "namespace": "nothing",
    "name": "myAvroSchema",
    "type": "record",
    "fields": [
      {
        "name": "checkInCustomerReference",
        "type": "string"
      },
      {
        "name": "customerContacts",
        "type": "record",
        "fields": [
          {
            "name": "customerEmail",
            "type": "array",
            "items": {
              "type": "record",
              "name": "customerEmail_element",
              "fields": [
                {
                  "name": "emailAddress",
                  "type": "string"
                },
                {
                  "name": "typeOfEmail",
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "customerPhone",
            "type": "array",
            "items": {
              "type": "record",
              "name": "customerPhone_element",
              "fields": [
                {
                  "name": "fullContactNumber",
                  "type": "string"
                },
                {
                  "name": "ISDCode",
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "DonotAskIndicator",
            "type": "record",
            "fields": [
              {
                "name": "donotAskDetails",
                "type": "string"
              }
            ]
          }
        ]
      },
      {
        "name": "somethingElseToCheck",
        "type": "string"
      }
    ]
  }
  </code></pre>
  
  <p>To generate and avro file using the avro-tools:</p>
  
  <pre><code>avro-tools fromjson --schema-file myAvroSchema.avsc myJson.json &gt; myAvroData.avro
  </code></pre>
  
  <p>But I am getting the following error message:</p>
  
  <blockquote>
    <p>Exception in thread "main" org.apache.avro.SchemaParseException:
    "record" is not a defined name. The type of the "customerContacts"
    field must be a defined name or a {"type": ...} expression.</p>
  </blockquote>
  
  <p>Can anyone tell me why record is not identified as a defined name?</p>