Client method `getSchemas()` does not inform about the version of the returned AVRO schemas
fmiguelez opened this issue · 0 comments
fmiguelez commented
Even though REST call to endpoint /schemas
returns corresponding version with each schema entry, in the object ParsedSchema
(implemented by AvroSchema
) is set to null
.
The BUG is in this line of AvroSchemaProvider
:
It should set the version that comes in Schema
object:
@Override
public ParsedSchema parseSchemaOrElseThrow(Schema schema, boolean isNew, boolean normalize) {
try {
return new AvroSchema(
schema.getSchema(),
schema.getReferences(),
resolveReferences(schema),
schema.getMetadata(),
schema.getRuleSet(),
schema.getVersion(), // Proposed change
(validateDefaults || normalize) && isNew
);
} catch (Exception e) {
log.error("Could not parse Avro schema", e);
throw e;
}
}