See https://github.com/Azure/autorest.java/pull/2408 Current generated code seems get confused around - JsonTypeId https://fasterxml.github.io/jackson-annotations/javadoc/2.9/com/fasterxml/jackson/annotation/JsonTypeId.html - JsonTypeInfo.As.EXISTING_PROPERTY https://fasterxml.github.io/jackson-annotations/javadoc/2.9/com/fasterxml/jackson/annotation/JsonTypeInfo.As.html - static var --- The serialization can work with either - use `JsonTypeInfo.As.PROPERTY` or - remove the `JsonTypeId` and make discriminator a (standard JSON property) class variable (not static)
See #2408
Current generated code seems get confused around
The serialization can work with either
JsonTypeInfo.As.PROPERTYor
JsonTypeIdand make discriminator a (standard JSON property) class variable (not static)