Open talvey opened 3 years ago
related to #263
Is there any progress on this issue? At the moment I am forced to use the workaround solution by copying the same type in all the schemas. KTB can compile such a configuration, but as you know, "the last" type wins. This is a bad praxis as the same type must be copy-pasted and in case of changes there is a big possiblity to introduce some mistakes as the type which should be defined once and referenced then from other schemas need to be updated in all schemas.
It was kind of "ok" for long time, but after the update of the maven plugin "org.apache.avro:avro-compiler" to version 1.12.0 it became a real problem, because that plugin became more strict and it does not allow to redefine the same time multiple times. So, I need to use older version of the maven plugin in order to make schemas compatible for KTB.
Is it really necessary to modify something, as it looks like the Confluent support new syntax? https://akhq.io/docs/configuration/schema-registry/schema-references.html
Attempting to register an Avro schema with a contained schema reference fails. Currently, there is no way to add schema references to the descriptor config.
As an example, given a primary schema (MyOrder-with-reference.avsc) and a referenced schema (MyContext.avsc), attempting to register the primary will fail with the following
MyOrder-with-reference.avsc
MyContext.avsc
descriptor.yaml
Describe the solution you'd like I'd like to be able to either specify schema references in the descriptor configuration, or better yet, allow for automatic detection of references in local files.
Describe alternatives you've considered I've used the
kafka-schema-registry-maven-plugin
maven plugin to manage schemas; however, you still can't reference those validly registered schemas (with references) in the descriptor yaml. In this scenario, configuration for schemas and topics has no direct relationship.Additional context
Relevant code: It appears the current call hard-codes an empty list of references, so even if you "pre-register" the referenced schema in the registry, the
parseSchema()
will fail https://github.com/kafka-ops/julie/blob/73c18eacdc21b4573d88acdcfea37be32b0ec3ec/src/main/java/com/purbon/kafka/topology/schemas/SchemaRegistryManager.java#L83