I want to register an Avro schema which references another Avro schema on the schema registry.
First I've registered the following base Avro schema:
{
"type":"record",
"name":"Client",
"namespace":"com.test.client",
"doc": "Client Property specific information is specified in this object",
"fields" : [
{"name" : "name", "type" : [ "null", "string" ]},
{"name" : "address", "type" : [ "null", "string"]}
]
}
Them if I try to register the following Avro schema which refers to the base one within 'client' attribute the operation fails with error 422
{
"type":"record",
"name":"AnotherObject",
"namespace":"com.test.client",
"fields":
[
{"name":"tenant", "type": [ "null", "long" ]},
{"name":"client", "type" : [ "null","com.test.client.Client"]}
]
}
It seems issue is related to specifying custom type fields.
Any idea how to add custom type while registering related schemas in schema registry?