Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2115

Support @Union in members too

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.9.0
    • None
    • None

    Description

      Allow defining unions in members:

      class MyDatum {
         @Nullable
         @Union({String.class, Long.class, Other.class,...})
         Object o;
      }
      

      It can currently be implemented using @AvroSchema like this, but it is seems in my oppinion more verbose and more difficult to maintain:

      @AvroSchema("[\"null\",\"string\",...")
      

      Attachments

        Issue Links

          Activity

            People

              elmendavies Miguel
              elmendavies Miguel
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: