Codable with references?

Nothing synthesized does — it's always keyed. Array and Dictionary use unkeyed containers, though, so it's not likely that you're going to be able to avoid them unless you don't have any arrays or dictionaries (sounds unlikely).