Skip to content

v1.2.0

Compare
Choose a tag to compare
@mikaello mikaello released this 11 Jun 06:35

Added partial support for referencing types in other schemata. This is partial because it only works if the schema to be referenced is parsed first. I.e. if you have a schema A that reference a type in B, B has to be parsed first. In practice this means that you have to be careful when ordering the schemata on the command line when you run this tool. This may be fixed in the future.

Responsible commit: 3b3dc94

Minimal example:

Schemata that reference type in external schema:

{
  "name": "TheReferrer",
  "doc": "A complex object referencing object from another schema",
  "namespace": "com.example_referrer",
  "type": "record",
  "fields": [
    {
      "name": "externalObject",
      "type": "com.example_referent.ToBeReferred",
      "doc": "An object from another schema"
    }
  ]
}

Schema that is referenced:

{
  "name": "ToBeReferred",
  "type": "record",
  "namespace": "com.example_referent",
  "doc": "A simple object provided as a building block",
  "fields": [
    {
      "name": "value",
      "type": "boolean",
      "doc": "The value of the object to be referenced"
    }
  ]
}

Result:
image