Conversation
|
Moshi Requires that naming convention to work faster that's why the checkstyle test is failing. I don't see a problem with it as we are using the getters and setters anyways |
| // Retrofit | ||
| implementation "com.squareup.retrofit2:retrofit:$rootProject.retrofit_version" | ||
| implementation "com.squareup.retrofit2:converter-gson:$rootProject.retrofit_version" | ||
| implementation "com.squareup.moshi:moshi:1.11.0" |
There was a problem hiding this comment.
Please use the usual dependency version specification style that has been used for others
| .newBuilder() | ||
| .addInterceptor(new ZomatoApiInterceptor()) | ||
| .addInterceptor(logging) | ||
| .readTimeout(5, TimeUnit.SECONDS) |
There was a problem hiding this comment.
@epicadk we are not expecting a huge load on the server so I believe we can keep lower socket time out values. But still, I believe the connection time out value can be set as low as 5 seconds but the socket timeout can be dragged a little higher like 10 seconds.
What was your reasoning behind setting this as 5 seconds?
| private int rating; | ||
| @Expose | ||
| private int zomatoResId; | ||
| private int zomato_res_id; |
There was a problem hiding this comment.
Yeah moshi requires snake case.
| @SuppressWarnings("unused") | ||
| public class RefreshResponse { | ||
| String authToken; | ||
| String auth_token; |
| private String authToken; | ||
| @Expose | ||
| private String refreshToken; | ||
| private String auth_token; |
There was a problem hiding this comment.
You are not following the camel case style of writing and because of this build tests are failing. Please fix this
Description
Added Moshi converter Factory fixes #68
Please ensure the following and put a check accordingly
My code doesn't break/affect any unrelated part of the codebase.
Ran
./gradlew checkstyleSquashed multiple commits (if irrelevant) into one commit