PostmanToRetrofit2
This is a Android Studio plugin can generate Retrofit2's java code from postman's collection.
Install
-
Clone or download Retrofit2Plugin.jar
-
Open Android Studio
- Preferences > Plugins > Install plugin from disk.. > import Retrofit2Plugin.jar
-
Restart Android Studio
Usage
Import Retrofit2
gradle
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
Import RxJava2
gradle
implementation "io.reactivex.rxjava2:rxjava:2.0.1"
Create ApiService.java
Right click > Generate > Retrofit2Generator > Paste your postman collection > OK