Closed keirlawson closed 2 years ago
Right now this is afaik not possible to represent. Avro4k does currently not support open polymorphic references (see https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/polymorphism.md#open-polymorphism).
This would be needed to serialize the following data structure which would matches the first mentioned schema:
interface Operation
@Serializable
data class OperationOnEntry( ... ) : Operation
@Serializable
enum class Read : Operation {
Read
}
This is now possible with the support of polymorphic classes #110
I have a schema that includes the below type:
Is it possible to represent this type in Kotlin using Avro4k? I tried
However this produces