Details
-
Wish
-
Status: Open
-
Trivial
-
Resolution: Unresolved
-
1.8.2
-
None
-
None
Description
Hello! first of all, congratulations on the project.
I am generating avro schemas from java class, and my class already have annotations referring to not null. I would like to know if it is possible to somehow override the default behavior to define the nullable in the schema.
My code looks like this:
public class MyJavaClass { @javax.validation.constraints.NotNull // This is necessary for my project. @org.apache.avro.reflect.Nullable // I wanted to avoid having to use this annotation private String field; } Schema schema = ReflectData.get().getSchema(MyJavaClass.class);
thank you all