Skip to content

Update retrofit2 and retrofit2rx to use retrofit 2.0.1 #2479

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

Merged
merged 4 commits into from
Apr 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public JavaClientCodegen() {
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.6");
supportedLibraries.put("okhttp-gson", "HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1");
supportedLibraries.put(RETROFIT_1, "HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1 (Retrofit 1.9.0)");
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 2.5.0. JSON processing: Gson 2.4 (Retrofit 2.0.0-beta4). Enable the RxJava adapter using '-DuseRxJava=true'.");
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 2.5.0. JSON processing: Gson 2.4 (Retrofit 2.0.1). Enable the RxJava adapter using '-DuseRxJava=true'. (RxJava 1.1.2)");

CliOption library = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
library.setDefault(DEFAULT_LIBRARY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ if(hasProperty('target') && target == 'android') {

ext {
oltu_version = "1.0.1"
retrofit_version = "2.0.0-beta4"
gson_version = "2.6.2"
retrofit_version = "2.0.2"
swagger_annotations_version = "1.5.8"
junit_version = "4.12"
{{#useRxJava}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,17 @@
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>${retrofit-version}</version>
<artifactId>converter-gson</artifactId>
<version>${retrofit-version}</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-scalars</artifactId>
<artifactId>retrofit</artifactId>
<version>${retrofit-version}</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-gson</artifactId>
<artifactId>converter-scalars</artifactId>
<version>${retrofit-version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -153,8 +153,9 @@
</dependencies>
<properties>
<swagger-core-version>1.5.8</swagger-core-version>
<retrofit-version>2.0.0-beta4</retrofit-version>{{#useRxJava}}
<rxjava-version>1.1.3</rxjava-version>{{/useRxJava}}
<retrofit-version>2.0.2</retrofit-version>
{{#useRxJava}}<rxjava-version>1.1.3</rxjava-version>{{/useRxJava}}
<okhttp-version>3.2.0</okhttp-version>
<oltu-version>1.0.1</oltu-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.12</junit-version>
Expand Down
3 changes: 1 addition & 2 deletions samples/client/petstore/java/retrofit2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ if(hasProperty('target') && target == 'android') {

ext {
oltu_version = "1.0.1"
retrofit_version = "2.0.0-beta4"
gson_version = "2.6.2"
retrofit_version = "2.0.2"
swagger_annotations_version = "1.5.8"
junit_version = "4.12"

Expand Down
1 change: 0 additions & 1 deletion samples/client/petstore/java/retrofit2/hello.txt

This file was deleted.

15 changes: 8 additions & 7 deletions samples/client/petstore/java/retrofit2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>
1.7</source>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
Expand All @@ -115,17 +114,17 @@
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>${retrofit-version}</version>
<artifactId>converter-gson</artifactId>
<version>${retrofit-version}</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-scalars</artifactId>
<artifactId>retrofit</artifactId>
<version>${retrofit-version}</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-gson</artifactId>
<artifactId>converter-scalars</artifactId>
<version>${retrofit-version}</version>
</dependency>
<dependency>
Expand All @@ -144,7 +143,9 @@
</dependencies>
<properties>
<swagger-core-version>1.5.8</swagger-core-version>
<retrofit-version>2.0.0-beta4</retrofit-version>
<retrofit-version>2.0.2</retrofit-version>

<okhttp-version>3.2.0</okhttp-version>
<oltu-version>1.0.1</oltu-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.12</junit-version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.swagger.client;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-22T23:08:50.551+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T10:03:24.454+02:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package io.swagger.client.api;

import io.swagger.client.CollectionFormats.*;


import retrofit2.Call;
import retrofit2.http.*;

import okhttp3.RequestBody;

import java.util.Date;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface FakeApi {
/**
* Fake endpoint for testing various parameters
* Fake endpoint for testing various parameters
* @param number None (required)
* @param _double None (required)
* @param string None (required)
* @param _byte None (required)
* @param integer None (optional)
* @param int32 None (optional)
* @param int64 None (optional)
* @param _float None (optional)
* @param binary None (optional)
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
* @return Call<Void>
*/

@FormUrlEncoded
@POST("fake")
Call<Void> testEndpointParameters(
@Field("number") String number, @Field("double") Double _double, @Field("string") String string, @Field("byte") byte[] _byte, @Field("integer") Integer integer, @Field("int32") Integer int32, @Field("int64") Long int64, @Field("float") Float _float, @Field("binary") byte[] binary, @Field("date") Date date, @Field("dateTime") Date dateTime, @Field("password") String password
);

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import okhttp3.RequestBody;

import io.swagger.client.model.Pet;
import java.io.File;
import io.swagger.client.model.ModelApiResponse;
import java.io.File;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public class FormatTest {
private String password = null;

/**
* minimum: 10.0
* maximum: 100.0
**/
@ApiModelProperty(value = "")
public Integer getInteger() {
Expand All @@ -61,6 +63,8 @@ public void setInteger(Integer integer) {
}

/**
* minimum: 20.0
* maximum: 200.0
**/
@ApiModelProperty(value = "")
public Integer getInt32() {
Expand All @@ -81,6 +85,8 @@ public void setInt64(Long int64) {
}

/**
* minimum: 32.1
* maximum: 543.2
**/
@ApiModelProperty(required = true, value = "")
public BigDecimal getNumber() {
Expand All @@ -91,6 +97,8 @@ public void setNumber(BigDecimal number) {
}

/**
* minimum: 54.3
* maximum: 987.6
**/
@ApiModelProperty(value = "")
public Float getFloat() {
Expand All @@ -101,6 +109,8 @@ public void setFloat(Float _float) {
}

/**
* minimum: 67.8
* maximum: 123.4
**/
@ApiModelProperty(value = "")
public Double getDouble() {
Expand All @@ -122,7 +132,7 @@ public void setString(String string) {

/**
**/
@ApiModelProperty(value = "")
@ApiModelProperty(required = true, value = "")
public byte[] getByte() {
return _byte;
}
Expand All @@ -142,7 +152,7 @@ public void setBinary(byte[] binary) {

/**
**/
@ApiModelProperty(value = "")
@ApiModelProperty(required = true, value = "")
public Date getDate() {
return date;
}
Expand All @@ -162,7 +172,7 @@ public void setDateTime(Date dateTime) {

/**
**/
@ApiModelProperty(value = "")
@ApiModelProperty(required = true, value = "")
public String getPassword() {
return password;
}
Expand Down

This file was deleted.

Loading