Java6 support: fix pom and gradle files, avoid diamond notation (#560)

This commit is contained in:
Jérémie Bresson
2018-07-14 15:13:23 +02:00
committed by William Cheng
parent df815344d1
commit 5a0a8f6a87
31 changed files with 256 additions and 31 deletions

View File

@@ -698,12 +698,12 @@ public class ApiClient {
Map<String, List<String>> responseHeaders = buildResponseHeaders(response);
if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) {
return new ApiResponse<>(statusCode, responseHeaders);
return new ApiResponse<T>(statusCode, responseHeaders);
} else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
if (returnType == null)
return new ApiResponse<>(statusCode, responseHeaders);
return new ApiResponse<T>(statusCode, responseHeaders);
else
return new ApiResponse<>(statusCode, responseHeaders, deserialize(response, returnType));
return new ApiResponse<T>(statusCode, responseHeaders, deserialize(response, returnType));
} else {
String message = "error";
String respBody = null;

View File

@@ -17,6 +17,7 @@ import org.openapitools.client.ApiException;
import java.math.BigDecimal;
import org.openapitools.client.model.Client;
import java.io.File;
import org.openapitools.client.model.FileSchemaTestClass;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.client.model.OuterComposite;
@@ -102,6 +103,22 @@ public class FakeApiTest {
// TODO: test validations
}
/**
*
*
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testBodyWithFileSchemaTest() throws ApiException {
FileSchemaTestClass fileSchemaTestClass = null;
api.testBodyWithFileSchema(fileSchemaTestClass);
// TODO: test validations
}
/**
*
*

View File

@@ -167,4 +167,22 @@ public class PetApiTest {
// TODO: test validations
}
/**
* uploads an image (required)
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void uploadFileWithRequiredFileTest() throws ApiException {
Long petId = null;
File requiredFile = null;
String additionalMetadata = null;
ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
// TODO: test validations
}
}