Package org.apache.avro.reflect
Annotation Type AvroSchema
Declares that a Java type should have a specified Avro schema, overriding the
normally inferred schema. May be used for classes, parameters, fields and
method return types.
This is useful for slight alterations to the schema that would be
automatically inferred. For example, a List<Integer>
whose
elements may be null might use the annotation
@AvroSchema("{\"type\":\"array\",\"items\":[\"null\",\"int\"]}")since the
Nullable
annotation could not be used here.-
Required Element Summary
-
Element Details
-
value
String valueThe schema to use for this value.
-