Kriskras99 commented on code in PR #591:
URL: https://github.com/apache/avro-rs/pull/591#discussion_r3605822074


##########
avro/src/serde/ser_schema/mod.rs:
##########
@@ -2216,4 +2218,33 @@ mod tests {
 
         Ok(())
     }
+
+    #[test]
+    fn avro_rs_529_enum_with_union_schema() -> TestResult {
+        #[derive(Debug, Serialize)]
+        enum TestEnum {
+            A,
+            B,
+            C,
+        }
+
+        let schema = Schema::parse_str(
+            r#"
+            [
+                "int",

Review Comment:
   That's unfortunately expected behaviour. The serializer cannot tell the 
difference between a user having an enum with a unit variant, and a user having 
a untagged enum with an enum with a unit variant.
   I'll add a note to the documentation that untagged enums with a null variant 
should not contain enums with unit variants.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to