I was able to get around the problem slightly by doing this instead:
Copy code
data class OnlineSalesDetailsProvidedEvent(
val oneId: OneId,
val twoId: TwoId,
@param:JsonProperty("onlineSalesDetails") @JsonUnwrapped val onlineSalesDetails: OnlineSalesDetails?
)