Issue with `_tag` value in extended classes when serializing with `Schema.TaggedClass`
Morning all. I'm writing some message publishing code and I want to define a base message type using
My base class is
I extend it like
but serialising an instance of
I would have expected that
Schema.TaggedClass to describe the common fields and then extends that to create more specific message types. When I serialise instances of the extended classes though, they retain the _tag value of the base tagged class, which I didn't expect. Am I implementing this wrong or is there a different Schema function I want?My base class is
I extend it like
but serialising an instance of
ExtractedEmailAvailableEvent gives meI would have expected that
_tag to be ExtractedEmailAvailableEvent