zalando-incubator / spark-json-schema

JSON schema parser for Apache Spark
MIT License
81 stars 43 forks source link

Updating spark sql version and adding tests for references of multiple types #39

Open charlyraffellini opened 5 years ago

charlyraffellini commented 5 years ago

Updating spark-sql version 2.0.1 => 2.4.3

Adding two test cases for references of multiple types. I found not obvious from the tests cases how the conversion of references like the one below will be. So I added two test cases.

          {
            "definitions": {
              "address": {
                "type": ["object", "array"],
                "properties": {
                  "street_address": { "type": "string" },
                  "city":           { "type": "string" },
                  "state":          { "type": "string" }
                }
              }
            },
            "type": "object",
            "properties": {
              "billing_address": { "$ref": "#/definitions/address" }
            }
          }