-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Add a Retrofit client generator #465
Comments
Sounds like a great idea! Maybe @olensmar would like to contribute it? ;) |
awesome - I'll definitely have a look! just FYI - the plugin referred to above generates Retrofit interfaces for any REST API, i.e. the API doesn't have to be defined with a swagger spec |
Any news on that guys? I use swagger for all my apis, but like retrofit better for the client side. It would be awesome to be able to generate the client automagically! |
The latest Java API client supports different HTTP client including Retrofit. To use Retrofit, please create a config.json file as follows:
and pass config.json via -c in the command line You can run Would that meet your requirement? |
Please reopen if you need help on this. It's now supported as an option when generating java clients. |
I just generated a cli based using the following command:
It all went well and seemed to work, I explored the code and liked what I saw, with Oauth authentication flow and everything in place, but when I tried a
I don't know if it's anything related to the retrofit or just a common bug. my git is pointing to the latest commit, which is 6b7ceab |
@Panthro I could repeat the issue. Let me look into it and get back to you. |
So, I tried.
|
@Panthro do you mind sharing the spec with us (privately via my personal email address or publicly) so that we can use it to reproduce the issue? |
shared with you by email. |
Is it possible to make option to use retrofit with kotlin and android? |
Retrofit is a very popular "type-safe REST client for Android and Java by Square, Inc".
Smartbear developed an example for GitHub API.
https://github.com/olensmar/github-retrofit-client/tree/master/src/main/java/com/olensmar/apis/github
They didn't use template. Instead, the generator is hard coded in Groovy. It should be possible to implement the same functionality with pure templates.
https://github.com/olensmar/soapui-retrofit-plugin/blob/e40722ebbb4c9c97017aa72c04d184e5cd65c4a6/src/main/groovy/com.smartbear.soapui.plugin.retrofit/RetrofitGenerator.groovy
The text was updated successfully, but these errors were encountered: