title: How to use "oneOf" in this schema?
body: <p>I'd like to have either A or B, but not both (mutual exclusive.)</p>
  <p>I have to use whatever is avaliable in Draft 3, even though it says 4 on the top. Reason being, when using array for &quot;required&quot;, it throws an error that it can't convert an array to a boolean. If I remove arrays without putting that I'm using draft 4 [Newtonsoft.Json.Schema.Extensions]::IsValid does not validate. It returns &quot;true&quot; willy nilly.</p>
  <p>Yes, I have to use an obsolete Newtonsoft.</p>
  <pre><code>{
    &quot;$schema&quot;: &quot;http://json-schema.org/draft-04/schema#&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;type&quot;: &quot;object&quot;,
    &quot;additionalProperties&quot;: false,
    &quot;properties&quot;: {
      &quot;SearchCriteria&quot;: {
        &quot;type&quot;: &quot;array&quot;,
        &quot;uniqueItems&quot;: true,
        &quot;minItems&quot;: 1,
        &quot;required&quot;: true,
        &quot;items&quot;: {
          &quot;type&quot;: &quot;object&quot;,
          &quot;additionalProperties&quot;: false,
          &quot;properties&quot;: {
            &quot;A&quot;: {
              &quot;type&quot;: &quot;string&quot;,
              &quot;minLength&quot;: 1,
              &quot;pattern&quot;: &quot;^[^\\s]*$&quot;
            },
            &quot;B&quot;: {
              &quot;type&quot;: &quot;array&quot;,
              &quot;items&quot;: {
                &quot;type&quot;: &quot;string&quot;,
                &quot;minLength&quot;: 1,
                &quot;pattern&quot;: &quot;^[^\\s]*$&quot;,
                &quot;enum&quot;: [&quot;One&quot;, &quot;Two&quot;]
              },
              &quot;minItems&quot;: 1
            },
            &quot;C&quot;: {
              &quot;type&quot;: &quot;string&quot;,
              &quot;required&quot;: true,
              &quot;minLength&quot;: 2
            },
            &quot;D&quot;: {
              &quot;type&quot;: &quot;array&quot;,
              &quot;required&quot;: true,
              &quot;items&quot;: {
                &quot;type&quot;: &quot;string&quot;
              },
              &quot;minItems&quot;: 1,
              &quot;uniqueItems&quot;: true
            }
          }
        }
      }
    }
  }
  </code></pre>