Despite the fact that DataResponse conforms to PublishedResponse, type alias Response = DataResponse isn't enough to conform to the protocol, the compiler continuously complains that there's no inner type Response. Is there a way to express the typealias to conform to the protocol?
Thanks. Your solution works but making DataRequest generic isn't possible. It's part of Alamofire's public API, and since requests can have multiple responses depending on parsing, it's not a requirement we'd want anyway. I do find it odd that the compiler accepts the definition of the typealias in my example, but can't use it to fulfill the protocol requirement.
You're right, there's no way to define the actual type with DataRequest. I could use the protocol to define one specific type, but I think I'm going to explore the problem space more before trying to come up with a single abstraction. This is all for my Combine work on Alamofire, so perhaps the publisher could provide the types necessary here, but I can start by making them concrete.