You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I remember that almost 1 year ago Retrofit threw an exception when an annotation outside of Retrofit api was used to annotate a method param. But now it doesn’t, it just ignore them.
I would like to know in which version this change was performed, if it that’s possible. Because I checked the CHANGELOG file and I didn’t find any information about this.
Nevertheless, I think this is really cool. Because it allows other libraries to play together with the same interface. Which I’m trying to do in order to create some sort of automated mocking and testing system.
Thanks!
The text was updated successfully, but these errors were encountered:
This change was made for 2.0 which changed a lot of old behaviors. It's not strictly called out in the change logs because it's not really a useful change on its own.
In fact, annotations on parameters are now passed to the converters. So, for example, you could have @Query("since") @Iso8601 Date since as a parameter and then register a converter factory with the Retrofit.Builder whose string converter could then see that Date type and see the @Iso8601 annotation and format the string appropriately. This is also true of the converter used for request bodies which are used for @Body and @Part.
Hi
I remember that almost 1 year ago Retrofit threw an exception when an annotation outside of Retrofit api was used to annotate a method param. But now it doesn’t, it just ignore them.
I would like to know in which version this change was performed, if it that’s possible. Because I checked the CHANGELOG file and I didn’t find any information about this.
Nevertheless, I think this is really cool. Because it allows other libraries to play together with the same interface. Which I’m trying to do in order to create some sort of automated mocking and testing system.
Thanks!
The text was updated successfully, but these errors were encountered: