This is an Android Studio plugin which can generate Retrofit2's Java/Kotlin code from Postman's collection.
- Supports RxJava and Coroutines with Retrofit2
- Class generation and selection for each request in the collection from the directory of your choice
- Automatic class generation from saved responses in a collection
- Sub-collections within a collection handling
- Postman Url parameters (i.e. :param) handling
- Postman form-data, form-urlencoded and raw body types handling
- GUI to help selecting the Postman collection from the file system and to choose the conversion settings
- mnemonics support in the GUI
- Saving the last user settings per project
Open Android Studio:
- File > Settings (For Mac Android Studio > Preferences) > Plugins > Search and install Postman to Retrofit2 V2
-
Download the latest plugin zip file from here
-
Open Android Studio
- File > Settings (For Mac Android Studion > Preferences) > Plugins > ⚙️ > Install plugin from disk.. > import PostmanToRetrofit2-v2-Plugin-*.zip
-
Restart Android Studio
gradle
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
Other versions can be found in Maven
gradle
implementation "io.reactivex.rxjava2:rxjava:2.0.1"
Other versions can be found in Maven