-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom parameter annotations support #2890
Comments
Same here. Would like to have Custom annotations on parameters so I can merge them into a Body with a custom adapter. Thought was maybe registering those annotations with the according mediatype to the Retrofit-Instance. (And another point would be nice: reading annotations from the service-interface for example to have a global namespace added) |
Same needs. |
same need. |
Same needs. |
Same need, currently considering another solution, using the @tag annotation instead. In my situation I implement my own Call.Factory where i get the OkHttp requests, for which I can access my custom method annotations by calling Instead I would rather use a custom annotation for this, that would be prettier: I think the solution would be to remove the line where the parameter error is thrown (RequestFactory.java:331). I'm not sure what other logic this would possibly break. |
I am writing a call adapter that would take response type and several custom annotated request parameters and transform them to a custom HTTP body. For example if user of my call adapter declares following request service:
my call adapter would prepare request that is equivalent to:
where
MyBody
is for example:without using my call adapter.
Looking into the code I have found out that there is currently not possible to have custom parameter annotations or any "adapter" that would transform custom annotations to Retrofit ones passing some information to the custom call adapter. Or am I wrong? Would it be possible to have such adapter?
The text was updated successfully, but these errors were encountered: