I have a following Retrofit request:
@GET("event/{id}")
suspend fun getEvent(@Path("id") eventId: Long): Response<Event>
However in my application I'm using the following wrapper for the event id:
data class EventId(val value: Long)
Is it possible to pass EventId class as a path parameter and somehow tell Retrofit how to convert the value to Long?
Here is the method signature I want to have:
@GET("event/{id}")
suspend fun getEvent(@Path("id") eventId: EventId): Response<Event>