Hello, this a dumb question, but I can not find the answer in the docs
I want to have a complicated schema with lots of Records referencing
other Records.
Like this...
{
"namespace": "com.foobah",
"name": "Bah",
"type": "record",
"fields": [
{"name": "value", "type": "int"}
]
}
{
"namespace": "com.foobah",
"name": "Foo",
"type": "record",
"fields": [
{"name": "bah", "type": "Bah"}
]
}
Using the Java API, how do I reference types within a schema? Let's say
I want to make a Foo object, I want to do something like this...
Schema schema = Schema.parse(schemaDescription);
>>> Schema foo = schema.getSchema("com.foobah.Foo"); <<<
GenericData o = new GenericData( foo );
Many thanks in advance
Peter