Skip to content

Commit

Permalink
fix retrofit2 play imports
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Nov 21, 2018
1 parent 7c1b34d commit 17191d1
Show file tree
Hide file tree
Showing 28 changed files with 198 additions and 103 deletions.
1 change: 1 addition & 0 deletions bin/java-petstore-retrofit2-play24.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with

echo "Removing files and folders under samples/client/petstore/java/retrofit2-play24/src/main"
rm -rf samples/client/petstore/java/retrofit2-play24/src/main
rm -rf samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger
find samples/client/petstore/java/retrofit2-play24 -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
java $JAVA_OPTS -jar $executable $ags
1 change: 1 addition & 0 deletions bin/java-petstore-retrofit2-play25.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with

echo "Removing files and folders under samples/client/petstore/java/retrofit2-play25/src/main"
rm -rf samples/client/petstore/java/retrofit2-play25/src/main
rm -rf samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger
find samples/client/petstore/java/retrofit2-play25 -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
java $JAVA_OPTS -jar $executable $ags
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {{invokerPackage}}.CollectionFormats.*;
import retrofit2.http.*;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;

{{#imports}}import {{import}};
{{/imports}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {{invokerPackage}}.CollectionFormats.*;
import retrofit2.http.*;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;

{{#imports}}import {{import}};
{{/imports}}
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ Long int64 = 789L; // Long | None
Float _float = 3.4F; // Float | None
String string = "string_example"; // String | None
byte[] binary = B; // byte[] | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
LocalDate date = LocalDate.now(); // LocalDate | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import retrofit2.http.*;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;

import io.swagger.client.model.Client;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import retrofit2.http.*;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;

import java.math.BigDecimal;
import io.swagger.client.model.Client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import retrofit2.http.*;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;

import io.swagger.client.model.Client;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import retrofit2.http.*;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;

import java.io.File;
import io.swagger.client.model.ModelApiResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import retrofit2.http.*;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;

import io.swagger.client.model.Order;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import retrofit2.http.*;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;

import io.swagger.client.model.User;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import io.swagger.client.ApiClient;
import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import io.swagger.client.model.OuterComposite;
import io.swagger.client.model.User;
import org.junit.Before;
import org.junit.Test;

Expand All @@ -25,11 +27,71 @@ public void setup() {
api = new ApiClient().createService(FakeApi.class);
}


/**
* To test \"client\" model
*
*
* Test serialization of outer boolean types
*/
@Test
public void fakeOuterBooleanSerializeTest() {
Boolean body = null;
// Boolean response = api.fakeOuterBooleanSerialize(body);

// TODO: test validations
}
/**
*
*
* Test serialization of object with outer number type
*/
@Test
public void fakeOuterCompositeSerializeTest() {
OuterComposite body = null;
// OuterComposite response = api.fakeOuterCompositeSerialize(body);

// TODO: test validations
}
/**
*
*
* Test serialization of outer number types
*/
@Test
public void fakeOuterNumberSerializeTest() {
BigDecimal body = null;
// BigDecimal response = api.fakeOuterNumberSerialize(body);

// TODO: test validations
}
/**
*
*
* Test serialization of outer string types
*/
@Test
public void fakeOuterStringSerializeTest() {
String body = null;
// String response = api.fakeOuterStringSerialize(body);

// TODO: test validations
}
/**
*
*
*
*/
@Test
public void testBodyWithQueryParamsTest() {
User body = null;
String query = null;
// api.testBodyWithQueryParams(body, query);

// TODO: test validations
}
/**
* To test \"client\" model
*
* To test \"client\" model
*/
@Test
public void testClientModelTest() {
Expand All @@ -38,7 +100,6 @@ public void testClientModelTest() {

// TODO: test validations
}

/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
Expand All @@ -57,18 +118,17 @@ public void testEndpointParametersTest() {
String string = null;
byte[] binary = null;
LocalDate date = null;
DateTime dateTime = null;
OffsetDateTime dateTime = null;
String password = null;
String paramCallback = null;
// Void response = api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
// api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);

// TODO: test validations
}

/**
* To test enum parameters
*
*
* To test enum parameters
*/
@Test
public void testEnumParametersTest() {
Expand All @@ -78,11 +138,35 @@ public void testEnumParametersTest() {
String enumHeaderString = null;
List<String> enumQueryStringArray = null;
String enumQueryString = null;
BigDecimal enumQueryInteger = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
// Void response = api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
// api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);

// TODO: test validations
}
/**
* test inline additionalProperties
*
*
*/
@Test
public void testInlineAdditionalPropertiesTest() {
Object param = null;
// api.testInlineAdditionalProperties(param);

// TODO: test validations
}
/**
* test json serialization of form data
*
*
*/
@Test
public void testJsonFormDataTest() {
String param = null;
String param2 = null;
// api.testJsonFormData(param, param2);

// TODO: test validations
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ public void setup() {
api = new ApiClient().createService(FakeClassnameTags123Api.class);
}


/**
* To test class name in snake case
*
*
* To test class name in snake case
*/
@Test
public void testClassnameTest() {
Expand All @@ -35,5 +34,4 @@ public void testClassnameTest() {

// TODO: test validations
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public void setup() {
api = new ApiClient().createService(PetApi.class);
}


/**
* Add a new pet to the store
*
Expand All @@ -33,11 +32,10 @@ public void setup() {
@Test
public void addPetTest() {
Pet body = null;
// Void response = api.addPet(body);
// api.addPet(body);

// TODO: test validations
}

/**
* Deletes a pet
*
Expand All @@ -47,11 +45,10 @@ public void addPetTest() {
public void deletePetTest() {
Long petId = null;
String apiKey = null;
// Void response = api.deletePet(petId, apiKey);
// api.deletePet(petId, apiKey);

// TODO: test validations
}

/**
* Finds Pets by status
*
Expand All @@ -64,7 +61,6 @@ public void findPetsByStatusTest() {

// TODO: test validations
}

/**
* Finds Pets by tags
*
Expand All @@ -77,7 +73,6 @@ public void findPetsByTagsTest() {

// TODO: test validations
}

/**
* Find pet by ID
*
Expand All @@ -90,7 +85,6 @@ public void getPetByIdTest() {

// TODO: test validations
}

/**
* Update an existing pet
*
Expand All @@ -99,11 +93,10 @@ public void getPetByIdTest() {
@Test
public void updatePetTest() {
Pet body = null;
// Void response = api.updatePet(body);
// api.updatePet(body);

// TODO: test validations
}

/**
* Updates a pet in the store with form data
*
Expand All @@ -114,11 +107,10 @@ public void updatePetWithFormTest() {
Long petId = null;
String name = null;
String status = null;
// Void response = api.updatePetWithForm(petId, name, status);
// api.updatePetWithForm(petId, name, status);

// TODO: test validations
}

/**
* uploads an image
*
Expand All @@ -133,5 +125,4 @@ public void uploadFileTest() {

// TODO: test validations
}

}
Loading

0 comments on commit 17191d1

Please sign in to comment.