mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 06:46:12 +00:00
Java6 support: fix pom and gradle files, avoid diamond notation (#560)
This commit is contained in:
committed by
William Cheng
parent
df815344d1
commit
5a0a8f6a87
@@ -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;
|
||||
|
||||
@@ -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 `File`.
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testBodyWithFileSchemaTest() throws ApiException {
|
||||
FileSchemaTestClass fileSchemaTestClass = null;
|
||||
api.testBodyWithFileSchema(fileSchemaTestClass);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user