title: Json schema validation error
body: <p>Im getting a few errors in while validaing JSON. Im unable to understand the errors can anyone help and explain a bit.</p>
  <pre><code>{
  &quot;$schema&quot;: &quot;http://json-schema.org/draft-04/schema#&quot;,
  &quot;description&quot;: &quot;Modified JSON Schema draft v4 that includes the optional '$ref' and 'format'&quot;,
  &quot;definitions&quot;: {
      &quot;schemaArray&quot;: {
          &quot;type&quot;: &quot;array&quot;,
          &quot;minItems&quot;: 1,
          &quot;items&quot;: { &quot;$ref&quot;: &quot;#&quot; }
      },
      &quot;positiveInteger&quot;: {
          &quot;type&quot;: &quot;integer&quot;,
          &quot;minimum&quot;: 0
      },
      &quot;positiveIntegerDefault0&quot;: {
          &quot;allOf&quot;: [ { &quot;$ref&quot;: &quot;#/definitions/positiveInteger&quot; }, { &quot;default&quot;: 0 } ]
      },
      &quot;simpleTypes&quot;: {
          &quot;enum&quot;: [ &quot;array&quot;, &quot;boolean&quot;, &quot;integer&quot;, &quot;null&quot;, &quot;number&quot;, &quot;object&quot;, &quot;string&quot; ]
      },
      &quot;stringArray&quot;: {
          &quot;type&quot;: &quot;array&quot;,
          &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; },
          &quot;minItems&quot;: 1,
          &quot;uniqueItems&quot;: true
      }
  },
  &quot;type&quot;: &quot;object&quot;,
  &quot;properties&quot;: {
      &quot;id&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;format&quot;: &quot;uri&quot;
      },
      &quot;$schema&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;format&quot;: &quot;uri&quot;
      },
      &quot;$ref&quot;: {
          &quot;type&quot;: &quot;string&quot;
      },
      &quot;format&quot;: {
          &quot;type&quot;: &quot;string&quot;
      },
      &quot;title&quot;: {
          &quot;type&quot;: &quot;string&quot;
      },
      &quot;description&quot;: {
          &quot;type&quot;: &quot;string&quot;
      },
      &quot;default&quot;: { },
      &quot;multipleOf&quot;: {
          &quot;type&quot;: &quot;number&quot;,
          &quot;minimum&quot;: 0,
          &quot;exclusiveMinimum&quot;: true
      },
      &quot;maximum&quot;: {
          &quot;type&quot;: &quot;number&quot;
      },
      &quot;exclusiveMaximum&quot;: {
          &quot;type&quot;: &quot;boolean&quot;,
          &quot;default&quot;: false
      },
      &quot;minimum&quot;: {
          &quot;type&quot;: &quot;number&quot;
      },
      &quot;exclusiveMinimum&quot;: {
          &quot;type&quot;: &quot;boolean&quot;,
          &quot;default&quot;: false
      },
      &quot;maxLength&quot;: { &quot;$ref&quot;: &quot;#/definitions/positiveInteger&quot; },
      &quot;minLength&quot;: { &quot;$ref&quot;: &quot;#/definitions/positiveIntegerDefault0&quot; },
      &quot;pattern&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;format&quot;: &quot;regex&quot;
      },
      &quot;additionalItems&quot;: {
          &quot;anyOf&quot;: [
              { &quot;type&quot;: &quot;boolean&quot; },
              { &quot;$ref&quot;: &quot;#&quot; }
          ],
          &quot;default&quot;: { }
      },
      &quot;items&quot;: {
          &quot;anyOf&quot;: [
              { &quot;$ref&quot;: &quot;#&quot; },
              { &quot;$ref&quot;: &quot;#/definitions/schemaArray&quot; }
          ],
          &quot;default&quot;: { }
      },
      &quot;maxItems&quot;: { &quot;$ref&quot;: &quot;#/definitions/positiveInteger&quot; },
      &quot;minItems&quot;: { &quot;$ref&quot;: &quot;#/definitions/positiveIntegerDefault0&quot; },
      &quot;uniqueItems&quot;: {
          &quot;type&quot;: &quot;boolean&quot;,
          &quot;default&quot;: false
      },
      &quot;maxProperties&quot;: { &quot;$ref&quot;: &quot;#/definitions/positiveInteger&quot; },
      &quot;minProperties&quot;: { &quot;$ref&quot;: &quot;#/definitions/positiveIntegerDefault0&quot; },
      &quot;required&quot;: { &quot;$ref&quot;: &quot;#/definitions/stringArray&quot; },
      &quot;additionalProperties&quot;: {
          &quot;anyOf&quot;: [
              { &quot;type&quot;: &quot;boolean&quot; },
              { &quot;$ref&quot;: &quot;#&quot; }
          ],
          &quot;default&quot;: { }
      },
      &quot;definitions&quot;: {
          &quot;type&quot;: &quot;object&quot;,
          &quot;additionalProperties&quot;: { &quot;$ref&quot;: &quot;#&quot; },
          &quot;default&quot;: { }
      },
      &quot;properties&quot;: {
          &quot;type&quot;: &quot;object&quot;,
          &quot;additionalProperties&quot;: { &quot;$ref&quot;: &quot;#&quot; },
          &quot;default&quot;: { }
      },
      &quot;patternProperties&quot;: {
          &quot;type&quot;: &quot;object&quot;,
          &quot;additionalProperties&quot;: { &quot;$ref&quot;: &quot;#&quot; },
          &quot;default&quot;: { }
      },
      &quot;dependencies&quot;: {
          &quot;type&quot;: &quot;object&quot;,
          &quot;additionalProperties&quot;: {
              &quot;anyOf&quot;: [
                  { &quot;$ref&quot;: &quot;#&quot; },
                  { &quot;$ref&quot;: &quot;#/definitions/stringArray&quot; }
              ]
          }
      },
      &quot;enum&quot;: {
          &quot;type&quot;: &quot;array&quot;,
          &quot;minItems&quot;: 1,
          &quot;uniqueItems&quot;: true
      },
      &quot;type&quot;: {
          &quot;anyOf&quot;: [
              { &quot;$ref&quot;: &quot;#/definitions/simpleTypes&quot; },
              {
                  &quot;type&quot;: &quot;array&quot;,
                  &quot;items&quot;: { &quot;$ref&quot;: &quot;#/definitions/simpleTypes&quot; },
                  &quot;minItems&quot;: 1,
                  &quot;uniqueItems&quot;: true
              }
          ]
      },
      &quot;allOf&quot;: { &quot;$ref&quot;: &quot;#/definitions/schemaArray&quot; },
      &quot;anyOf&quot;: { &quot;$ref&quot;: &quot;#/definitions/schemaArray&quot; },
      &quot;oneOf&quot;: { &quot;$ref&quot;: &quot;#/definitions/schemaArray&quot; },
      &quot;not&quot;: { &quot;$ref&quot;: &quot;#&quot; }
  },
  &quot;dependencies&quot;: {
      &quot;exclusiveMaximum&quot;: [ &quot;maximum&quot; ],
      &quot;exclusiveMinimum&quot;: [ &quot;minimum&quot; ]
  },
  &quot;default&quot;: { }
  </code></pre>
  <p>}</p>
  <p>And here is the json.</p>
  <pre><code>{
    &quot;type&quot;: &quot;identification.carrier&quot;,
    &quot;id&quot;: &quot;uui#abb0ef56-8562-4056-aa62-afb758a150ad&quot;,
    &quot;happened&quot;: &quot;2018-03-28T10:52:44.35+02:00&quot;,
    &quot;processed&quot;: &quot;2018-03-28T10:52:44.35+02:00&quot;,
    &quot;tracking_id&quot;: &quot;tid#ad2ebdb1-5d5b-4dcb-a058-494b6af89127&quot;,
    &quot;source_attributes&quot;: {
      &quot;id&quot;: &quot;idsadm@app44A0&quot;,
      &quot;data&quot;: {
        &quot;info&quot;: &quot;resumeIdentify: result: carrier has operator and mobile network&quot;,
        &quot;callId&quot;: &quot;ad2ebdb1-5d5b-4dcb-a058-494b6af89127&quot;,
        &quot;contextId&quot;: &quot;0aeb6745-a43c-4257-a535-6905d21a5297&quot;,
        &quot;ids_state&quot;: &quot;SUCCESS&quot;,
        &quot;ids_strategy_type&quot;: &quot;REDIRECT_MULTI_WITH_MSISDN_IN_HEADER&quot;,
        &quot;ids_identity_type&quot;: &quot;MSISDN&quot;,
        &quot;country&quot;: &quot;DE&quot;,
        &quot;ids_result_type&quot;: &quot;IDENTITY&quot;,
        &quot;ids_result_network&quot;: &quot;MobileNetwork[MOBILE=Vodafone D2 GmbH,operator=Operator[ref=10013,MNO=VODAFONE,countryIsoName=DE],countryIsoName=DE,ref=64,mnc=2,mcc=262,mvnos=[Operator[ref=30,MVNO=MOBILCOM-DEBITEL,countryIsoName=DE]]&quot;,
        &quot;idsServiceLine&quot;: &quot;599 387 240&quot;
      }
    },
    &quot;event_data&quot;: {
      &quot;service&quot;: {
        &quot;name&quot;: &quot;IdsService&quot;,
        &quot;version&quot;: &quot;4.1&quot;
      },
      &quot;result&quot;: {
        &quot;country&quot;: &quot;DE&quot;,
        &quot;mno&quot;: &quot;VODAFONE&quot;,
        &quot;mvno&quot;: &quot;MOBILCOM-DEBITEL&quot;,
        &quot;mcc&quot;: &quot;262&quot;,
        &quot;mnc&quot;: &quot;2&quot;
      }
    }
  }
  </code></pre>
  <p>Message:
  JSON does not match any schemas from 'anyOf'.
  Schema path:</p>
  <h1>/properties/type/anyOf</h1>
  <p>Message:
  Invalid type. Expected Array but got String.
  Schema path:</p>
  <h1>/properties/type/anyOf/1/type</h1>
  <p>Message:
  Value &quot;identification.carrier&quot; is not defined in enum.
  Schema path:</p>
  <h1>/definitions/simpleTypes/enum</h1>
  <p>Message:
  String 'uui#abb0ef56-8562-4056-aa62-afb758a150ad' does not validate against format 'uri'.
  Schema path:</p>
  <h1>/properties/id/format</h1>