Open BryceCicada opened 3 years ago
Commenting on my own issue here as I understand more...
I suspect the reason for requiring a name on the schema is because of the implicit subject naming that uses the name field from the schema. Would it make sense to relax this constraint in AvroHelper.validate()
if the subject name were passed in to register()
?
Hello, any update on this?
Hit this today and would love to know if anyone has a workaround.
I'd like to use a schema-registry avro schema to encode a kafka message key. Most of the time, the key is pretty simple like a string or a long. Other times, it's more complex and I can use a record type.
When the key isn't a record, but it's just a primitive type, I'm struggling to register the schema. For example:
gives:
I've also tried:
which have schemas that reduce to the same avro canonical form as the first example, but these give the same error.
I can register the schemas with the registry directly, eg:
which makes me think that
AvroHelper.validate()
might be a bit too strict in requiring aname
field on the schema.