Open fmiguelez opened 1 month ago
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.
/schemas
ParsedSchema
AvroSchema
null
The BUG is in this line of AvroSchemaProvider:
AvroSchemaProvider
https://github.com/confluentinc/schema-registry/blob/9e7ab57e7f1d5664bc08f42ad9678c5b68a769d8/client/src/main/java/io/confluent/kafka/schemaregistry/avro/AvroSchemaProvider.java#L55C11-L55C15
It should set the version that comes in Schema object:
Schema
@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; } }
Even though REST call to endpoint
/schemas
returns corresponding version with each schema entry, in the objectParsedSchema
(implemented byAvroSchema
) is set tonull
.The BUG is in this line of
AvroSchemaProvider
:https://github.com/confluentinc/schema-registry/blob/9e7ab57e7f1d5664bc08f42ad9678c5b68a769d8/client/src/main/java/io/confluent/kafka/schemaregistry/avro/AvroSchemaProvider.java#L55C11-L55C15
It should set the version that comes in
Schema
object: