org.apache.avro.reflect

## Annotation Type AvroSchema

-     @Retention(value=RUNTIME)
       @Target(value={TYPE,PARAMETER,METHOD,FIELD})
       @Documented
      public @interface 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

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `String` | `value` The schema to use for this value.

- - ### Element Detail

    - #### value

          public abstract String value

      The schema to use for this value.

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.