Closed pmisteliac closed 3 years ago
Hey I managed to fix it for the createUser. From what I understand, the correct Marshaller is brought in implicitly, if you just specify the type of event that youre getting.
Also, think you should make the structure something like: { "event": "UserCreated", "params": { "userId" : 217836143, //other params here if exist } }
This will later on make it easier to unmarshal
@PSilvestre Wow good catch! Type inference can be tricky :) I implemented the marshalling for all user events. However I did not embed the params in a branch but kept the hierarchy flat instead, as I don't see the advantage in creating a hierarchy and it its harder to marshall/unmarshall that way. However it's not clear to me where they get unmarshalled in our API.
Put into the backlog because it is very late to start changing this.
!!!! Doesn't work yet !!!! For some reason it still retruns the string representation. In all the examples it somehow magically transforms it to JSON, but these are all simple and don't use commandHandler like we do.
I'll be gone until Sunday, feel free to fuck with it if you need/want.