I’m using Phoenix Channels to power a mobile app (currently react-native, moving to swift/kotlin). As of today, I haven’t found a good way of sharing both the event names (e.g.
"new_msg") as well as payloads (request/response) look like. Today, I just mirror the code in my TypeScript interfaces on the client side. But with a larger team, this runs the risk of these two ends going out of sync.
It does seem that one can use a non-default serializer for the underlying Socket transport (for example, protobuf). Is that what people commonly use? I would like to stick to JSON payloads, so perhaps an OpenAPI/swagger solution could be useful.