title: A json Schema with an array of a $ref or an enum
body: <p>I would like to have a Json Schema that would enforce an array of $ref and an enum of null. I have accidentally defined a tuple - not what I want. Here is my current schema (note I must use draft-04):</p>
  <pre><code>{
      &quot;$schema&quot;: &quot;http://json-schema.org/draft-04/schema#&quot;,
      &quot;version&quot;: &quot;4.4.0&quot;,
      &quot;title&quot;: &quot;myCollection&quot;,
      &quot;description&quot;: &quot;Resume/CV&quot;,
      &quot;type&quot;: &quot;object&quot;,
      &quot;properties&quot;: {
          &quot;EmploymentHistories&quot;: {
              &quot;type&quot;: &quot;array&quot;,
              &quot;items&quot;: {
                  &quot;oneOf&quot;: [
                      {
                          &quot;$ref&quot;: &quot;../../../Common/json/base/TextType.json#&quot;
                      },
                      {
                          &quot;enum&quot;: [
                              null
                          ]
                  }
                  ]
              },
              &quot;additionalProperties&quot;: false
          }
      }
  }
  </code></pre>
  <p>And here is an instance I would like:</p>
  <pre><code>{
      &quot;EmploymentHistories&quot;: [
          {
              &quot;value&quot;: &quot;String&quot;,
              &quot;languageCode&quot;: &quot;aa&quot;
          },
          {
              &quot;value&quot;: &quot;String&quot;,
              &quot;languageCode&quot;: &quot;aa&quot;
          },
          null,
          null
      ]
  }
  </code></pre>
  <p>But I am getting an error on validation like:</p>
  <p>File D:\Dev\Proj\Recruiting\json\resumecv\samples\Untitled5.json is not valid.
  A value of type 'null' is not permitted here.
  Reason: it must be of one of the following types (see below)
  'string'
  'object'
  Hint: Either 'type' is present and doesn't contain 'null' or 'enum' is present and doesn't contain a value of type 'null'.
  Error location: EmploymentHistories / 3
  Details
  Array item '2' is not valid.
  Property 'EmploymentHistories' is not valid.
  A value of type 'null' is not permitted here.
  Reason: it must be of one of the following types (see below)
  'string'
  'object'
  Hint: Either 'type' is present and doesn't contain 'null' or 'enum' is present and doesn't contain a value of type 'null'.
  Error location: EmploymentHistories / 4
  Details
  Array item '3' is not valid.
  Property 'EmploymentHistories' is not valid.</p>
  <p>Any help is appreciated.<code>n</code></p>