[Java][client][native][Gradle] Add missing jackson-databind-nullable (#6802)

* Add missing jackson-databind-nullable to java-native Gradle build

Closes #6801

* Regenerate java-native samples

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Jochen Schalanda
2020-07-01 09:08:28 +02:00
committed by GitHub
parent 323cd38b5c
commit d9957ad0a9
64 changed files with 499 additions and 406 deletions

View File

@@ -17,20 +17,23 @@ import org.openapitools.client.ApiException;
import org.openapitools.client.model.Client;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
/**
* API tests for AnotherFakeApi
*/
@Ignore
public class AnotherFakeApiTest {
private final AnotherFakeApi api = new AnotherFakeApi();
/**
* To test special tags
*
@@ -41,11 +44,11 @@ public class AnotherFakeApiTest {
*/
@Test
public void call123testSpecialTagsTest() throws ApiException {
//
//Client body = null;
//
//Client response = api.call123testSpecialTags(body);
Client body = null;
CompletableFuture<Client> response =
api.call123testSpecialTags(body);
// TODO: test validations
}
}

View File

@@ -25,20 +25,23 @@ import org.openapitools.client.model.User;
import org.openapitools.client.model.XmlItem;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
/**
* API tests for FakeApi
*/
@Ignore
public class FakeApiTest {
private final FakeApi api = new FakeApi();
/**
* creates an XmlItem
*
@@ -49,14 +52,16 @@ public class FakeApiTest {
*/
@Test
public void createXmlItemTest() throws ApiException {
//
//XmlItem xmlItem = null;
//
//api.createXmlItem(xmlItem);
XmlItem xmlItem = null;
CompletableFuture<Void> response = api.createXmlItem(xmlItem);
// TODO: test validations
}
/**
*
*
* Test serialization of outer boolean types
*
* @throws ApiException
@@ -64,14 +69,16 @@ public class FakeApiTest {
*/
@Test
public void fakeOuterBooleanSerializeTest() throws ApiException {
//
//Boolean body = null;
//
//Boolean response = api.fakeOuterBooleanSerialize(body);
Boolean body = null;
CompletableFuture<Boolean> response =
api.fakeOuterBooleanSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of object with outer number type
*
* @throws ApiException
@@ -79,14 +86,16 @@ public class FakeApiTest {
*/
@Test
public void fakeOuterCompositeSerializeTest() throws ApiException {
//
//OuterComposite body = null;
//
//OuterComposite response = api.fakeOuterCompositeSerialize(body);
OuterComposite body = null;
CompletableFuture<OuterComposite> response =
api.fakeOuterCompositeSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of outer number types
*
* @throws ApiException
@@ -94,14 +103,16 @@ public class FakeApiTest {
*/
@Test
public void fakeOuterNumberSerializeTest() throws ApiException {
//
//BigDecimal body = null;
//
//BigDecimal response = api.fakeOuterNumberSerialize(body);
BigDecimal body = null;
CompletableFuture<BigDecimal> response =
api.fakeOuterNumberSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of outer string types
*
* @throws ApiException
@@ -109,14 +120,16 @@ public class FakeApiTest {
*/
@Test
public void fakeOuterStringSerializeTest() throws ApiException {
//
//String body = null;
//
//String response = api.fakeOuterStringSerialize(body);
String body = null;
CompletableFuture<String> response =
api.fakeOuterStringSerialize(body);
// TODO: test validations
}
/**
*
*
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
*
* @throws ApiException
@@ -124,28 +137,31 @@ public class FakeApiTest {
*/
@Test
public void testBodyWithFileSchemaTest() throws ApiException {
//
//FileSchemaTestClass body = null;
//
//api.testBodyWithFileSchema(body);
FileSchemaTestClass body = null;
CompletableFuture<Void> response = api.testBodyWithFileSchema(body);
// TODO: test validations
}
/**
*
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testBodyWithQueryParamsTest() throws ApiException {
//
//String query = null;
//
//User body = null;
//
//api.testBodyWithQueryParams(query, body);
String query = null;
User body = null;
CompletableFuture<Void> response = api.testBodyWithQueryParams(query, body);
// TODO: test validations
}
/**
* To test \&quot;client\&quot; model
*
@@ -156,13 +172,13 @@ public class FakeApiTest {
*/
@Test
public void testClientModelTest() throws ApiException {
//
//Client body = null;
//
//Client response = api.testClientModel(body);
Client body = null;
CompletableFuture<Client> response =
api.testClientModel(body);
// TODO: test validations
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
@@ -173,39 +189,26 @@ public class FakeApiTest {
*/
@Test
public void testEndpointParametersTest() throws ApiException {
//
//BigDecimal number = null;
//
//Double _double = null;
//
//String patternWithoutDelimiter = null;
//
//byte[] _byte = null;
//
//Integer integer = null;
//
//Integer int32 = null;
//
//Long int64 = null;
//
//Float _float = null;
//
//String string = null;
//
//File binary = null;
//
//LocalDate date = null;
//
//OffsetDateTime dateTime = null;
//
//String password = null;
//
//String paramCallback = null;
//
//api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
BigDecimal number = null;
Double _double = null;
String patternWithoutDelimiter = null;
byte[] _byte = null;
Integer integer = null;
Integer int32 = null;
Long int64 = null;
Float _float = null;
String string = null;
File binary = null;
LocalDate date = null;
OffsetDateTime dateTime = null;
String password = null;
String paramCallback = null;
CompletableFuture<Void> response = api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
// TODO: test validations
}
/**
* To test enum parameters
*
@@ -216,27 +219,20 @@ public class FakeApiTest {
*/
@Test
public void testEnumParametersTest() throws ApiException {
//
//List<String> enumHeaderStringArray = null;
//
//String enumHeaderString = null;
//
//List<String> enumQueryStringArray = null;
//
//String enumQueryString = null;
//
//Integer enumQueryInteger = null;
//
//Double enumQueryDouble = null;
//
//List<String> enumFormStringArray = null;
//
//String enumFormString = null;
//
//api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
List<String> enumHeaderStringArray = null;
String enumHeaderString = null;
List<String> enumQueryStringArray = null;
String enumQueryString = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
List<String> enumFormStringArray = null;
String enumFormString = null;
CompletableFuture<Void> response = api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
// TODO: test validations
}
/**
* Fake endpoint to test group parameters (optional)
*
@@ -247,56 +243,65 @@ public class FakeApiTest {
*/
@Test
public void testGroupParametersTest() throws ApiException {
//
//Integer requiredStringGroup = null;
//
//Boolean requiredBooleanGroup = null;
//
//Long requiredInt64Group = null;
//
//Integer stringGroup = null;
//
//Boolean booleanGroup = null;
//
//Long int64Group = null;
//
//api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
Integer requiredStringGroup = null;
Boolean requiredBooleanGroup = null;
Long requiredInt64Group = null;
Integer stringGroup = null;
Boolean booleanGroup = null;
Long int64Group = null;
FakeApi.APItestGroupParametersRequest request = FakeApi.APItestGroupParametersRequest.newBuilder()
.requiredStringGroup(requiredStringGroup)
.requiredBooleanGroup(requiredBooleanGroup)
.requiredInt64Group(requiredInt64Group)
.stringGroup(stringGroup)
.booleanGroup(booleanGroup)
.int64Group(int64Group)
.build();
CompletableFuture<Void> response = api.testGroupParameters(request);
// TODO: test validations
}
/**
* test inline additionalProperties
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testInlineAdditionalPropertiesTest() throws ApiException {
//
//Map<String, String> param = null;
//
//api.testInlineAdditionalProperties(param);
Map<String, String> param = null;
CompletableFuture<Void> response = api.testInlineAdditionalProperties(param);
// TODO: test validations
}
/**
* test json serialization of form data
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testJsonFormDataTest() throws ApiException {
//
//String param = null;
//
//String param2 = null;
//
//api.testJsonFormData(param, param2);
String param = null;
String param2 = null;
CompletableFuture<Void> response = api.testJsonFormData(param, param2);
// TODO: test validations
}
/**
*
*
* To test the collection format in query parameters
*
* @throws ApiException
@@ -304,19 +309,15 @@ public class FakeApiTest {
*/
@Test
public void testQueryParameterCollectionFormatTest() throws ApiException {
//
//List<String> pipe = null;
//
//List<String> ioutil = null;
//
//List<String> http = null;
//
//List<String> url = null;
//
//List<String> context = null;
//
//api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
List<String> pipe = null;
List<String> ioutil = null;
List<String> http = null;
List<String> url = null;
List<String> context = null;
CompletableFuture<Void> response = api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
// TODO: test validations
}
}

View File

@@ -17,20 +17,23 @@ import org.openapitools.client.ApiException;
import org.openapitools.client.model.Client;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
/**
* API tests for FakeClassnameTags123Api
*/
@Ignore
public class FakeClassnameTags123ApiTest {
private final FakeClassnameTags123Api api = new FakeClassnameTags123Api();
/**
* To test class name in snake case
*
@@ -41,11 +44,11 @@ public class FakeClassnameTags123ApiTest {
*/
@Test
public void testClassnameTest() throws ApiException {
//
//Client body = null;
//
//Client response = api.testClassname(body);
Client body = null;
CompletableFuture<Client> response =
api.testClassname(body);
// TODO: test validations
}
}

View File

@@ -17,54 +17,61 @@ import org.openapitools.client.ApiException;
import java.io.File;
import org.openapitools.client.model.ModelApiResponse;
import org.openapitools.client.model.Pet;
import java.util.Set;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
/**
* API tests for PetApi
*/
@Ignore
public class PetApiTest {
private final PetApi api = new PetApi();
/**
* Add a new pet to the store
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void addPetTest() throws ApiException {
//
//Pet body = null;
//
//api.addPet(body);
Pet body = null;
CompletableFuture<Void> response = api.addPet(body);
// TODO: test validations
}
/**
* Deletes a pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void deletePetTest() throws ApiException {
//
//Long petId = null;
//
//String apiKey = null;
//
//api.deletePet(petId, apiKey);
Long petId = null;
String apiKey = null;
CompletableFuture<Void> response = api.deletePet(petId, apiKey);
// TODO: test validations
}
/**
* Finds Pets by status
*
@@ -75,13 +82,13 @@ public class PetApiTest {
*/
@Test
public void findPetsByStatusTest() throws ApiException {
//
//List<String> status = null;
//
//List<Pet> response = api.findPetsByStatus(status);
List<String> status = null;
CompletableFuture<List<Pet>> response =
api.findPetsByStatus(status);
// TODO: test validations
}
/**
* Finds Pets by tags
*
@@ -92,13 +99,13 @@ public class PetApiTest {
*/
@Test
public void findPetsByTagsTest() throws ApiException {
//
//List<String> tags = null;
//
//List<Pet> response = api.findPetsByTags(tags);
Set<String> tags = null;
CompletableFuture<Set<Pet>> response =
api.findPetsByTags(tags);
// TODO: test validations
}
/**
* Find pet by ID
*
@@ -109,83 +116,85 @@ public class PetApiTest {
*/
@Test
public void getPetByIdTest() throws ApiException {
//
//Long petId = null;
//
//Pet response = api.getPetById(petId);
Long petId = null;
CompletableFuture<Pet> response =
api.getPetById(petId);
// TODO: test validations
}
/**
* Update an existing pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void updatePetTest() throws ApiException {
//
//Pet body = null;
//
//api.updatePet(body);
Pet body = null;
CompletableFuture<Void> response = api.updatePet(body);
// TODO: test validations
}
/**
* Updates a pet in the store with form data
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void updatePetWithFormTest() throws ApiException {
//
//Long petId = null;
//
//String name = null;
//
//String status = null;
//
//api.updatePetWithForm(petId, name, status);
Long petId = null;
String name = null;
String status = null;
CompletableFuture<Void> response = api.updatePetWithForm(petId, name, status);
// TODO: test validations
}
/**
* uploads an image
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void uploadFileTest() throws ApiException {
//
//Long petId = null;
//
//String additionalMetadata = null;
//
//File file = null;
//
//ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
Long petId = null;
String additionalMetadata = null;
File file = null;
CompletableFuture<ModelApiResponse> response =
api.uploadFile(petId, additionalMetadata, file);
// 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);
Long petId = null;
File requiredFile = null;
String additionalMetadata = null;
CompletableFuture<ModelApiResponse> response =
api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
// TODO: test validations
}
}

View File

@@ -17,20 +17,23 @@ import org.openapitools.client.ApiException;
import org.openapitools.client.model.Order;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
/**
* API tests for StoreApi
*/
@Ignore
public class StoreApiTest {
private final StoreApi api = new StoreApi();
/**
* Delete purchase order by ID
*
@@ -41,13 +44,13 @@ public class StoreApiTest {
*/
@Test
public void deleteOrderTest() throws ApiException {
//
//String orderId = null;
//
//api.deleteOrder(orderId);
String orderId = null;
CompletableFuture<Void> response = api.deleteOrder(orderId);
// TODO: test validations
}
/**
* Returns pet inventories by status
*
@@ -58,11 +61,12 @@ public class StoreApiTest {
*/
@Test
public void getInventoryTest() throws ApiException {
//
//Map<String, Integer> response = api.getInventory();
CompletableFuture<Map<String, Integer>> response =
api.getInventory();
// TODO: test validations
}
/**
* Find purchase order by ID
*
@@ -73,26 +77,28 @@ public class StoreApiTest {
*/
@Test
public void getOrderByIdTest() throws ApiException {
//
//Long orderId = null;
//
//Order response = api.getOrderById(orderId);
Long orderId = null;
CompletableFuture<Order> response =
api.getOrderById(orderId);
// TODO: test validations
}
/**
* Place an order for a pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void placeOrderTest() throws ApiException {
//
//Order body = null;
//
//Order response = api.placeOrder(body);
Order body = null;
CompletableFuture<Order> response =
api.placeOrder(body);
// TODO: test validations
}
}

View File

@@ -17,20 +17,23 @@ import org.openapitools.client.ApiException;
import org.openapitools.client.model.User;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
/**
* API tests for UserApi
*/
@Ignore
public class UserApiTest {
private final UserApi api = new UserApi();
/**
* Create user
*
@@ -41,43 +44,47 @@ public class UserApiTest {
*/
@Test
public void createUserTest() throws ApiException {
//
//User body = null;
//
//api.createUser(body);
User body = null;
CompletableFuture<Void> response = api.createUser(body);
// TODO: test validations
}
/**
* Creates list of users with given input array
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithArrayInputTest() throws ApiException {
//
//List<User> body = null;
//
//api.createUsersWithArrayInput(body);
List<User> body = null;
CompletableFuture<Void> response = api.createUsersWithArrayInput(body);
// TODO: test validations
}
/**
* Creates list of users with given input array
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithListInputTest() throws ApiException {
//
//List<User> body = null;
//
//api.createUsersWithListInput(body);
List<User> body = null;
CompletableFuture<Void> response = api.createUsersWithListInput(body);
// TODO: test validations
}
/**
* Delete user
*
@@ -88,58 +95,64 @@ public class UserApiTest {
*/
@Test
public void deleteUserTest() throws ApiException {
//
//String username = null;
//
//api.deleteUser(username);
String username = null;
CompletableFuture<Void> response = api.deleteUser(username);
// TODO: test validations
}
/**
* Get user by user name
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void getUserByNameTest() throws ApiException {
//
//String username = null;
//
//User response = api.getUserByName(username);
String username = null;
CompletableFuture<User> response =
api.getUserByName(username);
// TODO: test validations
}
/**
* Logs user into the system
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void loginUserTest() throws ApiException {
//
//String username = null;
//
//String password = null;
//
//String response = api.loginUser(username, password);
String username = null;
String password = null;
CompletableFuture<String> response =
api.loginUser(username, password);
// TODO: test validations
}
/**
* Logs out current logged in user session
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void logoutUserTest() throws ApiException {
//
//api.logoutUser();
CompletableFuture<Void> response = api.logoutUser();
// TODO: test validations
}
/**
* Updated user
*
@@ -150,13 +163,12 @@ public class UserApiTest {
*/
@Test
public void updateUserTest() throws ApiException {
//
//String username = null;
//
//User body = null;
//
//api.updateUser(username, body);
String username = null;
User body = null;
CompletableFuture<Void> response = api.updateUser(username, body);
// TODO: test validations
}
}

View File

@@ -21,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.BigCat;
import org.openapitools.client.model.Cat;
import org.openapitools.client.model.Dog;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

View File

@@ -16,6 +16,8 @@ package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

View File

@@ -16,10 +16,13 @@ package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Animal;
import org.openapitools.client.model.BigCat;
import org.openapitools.client.model.CatAllOf;
import org.junit.Assert;
import org.junit.Ignore;

View File

@@ -16,6 +16,8 @@ package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

View File

@@ -20,7 +20,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import org.openapitools.client.model.Category;
import org.openapitools.client.model.Tag;
import org.junit.Assert;