We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20c1397 commit c49b633Copy full SHA for c49b633
1 file changed
lib/codecs/src/encoding/format/avro.rs
@@ -25,6 +25,13 @@ impl AvroSerializerConfig {
25
pub fn build(&self) -> Result<AvroSerializer, BuildError> {
26
let schema = apache_avro::Schema::parse_str(&self.avro.schema)
27
.map_err(|error| format!("Failed building Avro serializer: {error}"))?;
28
+
29
+ if let Some(schema_id) = self.avro.schema_id
30
+ && schema_id < 0
31
+ {
32
+ return Err("Confluent Avro schema id must be a positive i32 number".into());
33
+ }
34
35
Ok(AvroSerializer {
36
schema,
37
schema_id: self.avro.schema_id,
0 commit comments