[Java] update test samples (#9972)

* remove new java samples

* java feign, webclient use fake petstore for tests

* update samples
This commit is contained in:
William Cheng
2021-07-19 11:08:44 +08:00
committed by GitHub
parent c5f5d3dd6a
commit e263e6acc0
1844 changed files with 2953 additions and 213806 deletions

View File

@@ -53,8 +53,12 @@ public class ApiClient {
auth = new ApiKeyAuth("header", "api_key");
} else if ("api_key_query".equals(authName)) {
auth = new ApiKeyAuth("query", "api_key_query");
} else if ("bearer_test".equals(authName)) {
auth = new HttpBearerAuth("bearer");
} else if ("http_basic_test".equals(authName)) {
auth = new HttpBasicAuth();
} else if ("http_signature_test".equals(authName)) {
auth = new HttpBearerAuth("signature");
} else if ("petstore_auth".equals(authName)) {
auth = buildOauthRequestInterceptor(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
} else {

View File

@@ -18,7 +18,7 @@ public interface AnotherFakeApi extends ApiClient.Api {
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param body client model (required)
* @param client client model (required)
* @return Client
*/
@RequestLine("PATCH /another-fake/dummy")
@@ -26,5 +26,5 @@ public interface AnotherFakeApi extends ApiClient.Api {
"Content-Type: application/json",
"Accept: application/json",
})
Client call123testSpecialTags(Client body);
Client call123testSpecialTags(Client client);
}

View File

@@ -0,0 +1,28 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.InlineResponseDefault;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import feign.*;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public interface DefaultApi extends ApiClient.Api {
/**
*
*
* @return InlineResponseDefault
*/
@RequestLine("GET /foo")
@Headers({
"Accept: application/json",
})
InlineResponseDefault fooGet();
}

View File

@@ -7,11 +7,13 @@ import java.math.BigDecimal;
import org.openapitools.client.model.Client;
import java.io.File;
import org.openapitools.client.model.FileSchemaTestClass;
import org.openapitools.client.model.HealthCheckResult;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.client.model.OuterComposite;
import org.openapitools.client.model.OuterObjectWithEnumProperty;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.User;
import org.openapitools.client.model.XmlItem;
import java.util.ArrayList;
import java.util.HashMap;
@@ -24,16 +26,65 @@ public interface FakeApi extends ApiClient.Api {
/**
* creates an XmlItem
* this route creates an XmlItem
* @param xmlItem XmlItem Body (required)
* Health check endpoint
*
* @return HealthCheckResult
*/
@RequestLine("POST /fake/create_xml_item")
@RequestLine("GET /fake/health")
@Headers({
"Content-Type: application/xml",
"Accept: application/json",
})
void createXmlItem(XmlItem xmlItem);
HealthCheckResult fakeHealthGet();
/**
* test http signature authentication
*
* @param pet Pet object that needs to be added to the store (required)
* @param query1 query parameter (optional)
* @param header1 header parameter (optional)
*/
@RequestLine("GET /fake/http-signature-test?query_1={query1}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
"header_1: {header1}"
})
void fakeHttpSignatureTest(Pet pet, @Param("query1") String query1, @Param("header1") String header1);
/**
* test http signature authentication
*
* Note, this is equivalent to the other <code>fakeHttpSignatureTest</code> method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
* used with the {@link FakeHttpSignatureTestQueryParams} class that allows for
* building up this map in a fluent style.
* @param pet Pet object that needs to be added to the store (required)
* @param header1 header parameter (optional)
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>query1 - query parameter (optional)</li>
* </ul>
*/
@RequestLine("GET /fake/http-signature-test?query_1={query1}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
"header_1: {header1}"
})
void fakeHttpSignatureTest(Pet pet, @Param("header1") String header1, @QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the
* <code>fakeHttpSignatureTest</code> method in a fluent style.
*/
public static class FakeHttpSignatureTestQueryParams extends HashMap<String, Object> {
public FakeHttpSignatureTestQueryParams query1(final String value) {
put("query_1", EncodingUtils.encode(value));
return this;
}
}
/**
*
@@ -43,7 +94,7 @@ public interface FakeApi extends ApiClient.Api {
*/
@RequestLine("POST /fake/outer/boolean")
@Headers({
"Content-Type: */*",
"Content-Type: application/json",
"Accept: */*",
})
Boolean fakeOuterBooleanSerialize(Boolean body);
@@ -51,15 +102,15 @@ public interface FakeApi extends ApiClient.Api {
/**
*
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @param outerComposite Input composite as post body (optional)
* @return OuterComposite
*/
@RequestLine("POST /fake/outer/composite")
@Headers({
"Content-Type: */*",
"Content-Type: application/json",
"Accept: */*",
})
OuterComposite fakeOuterCompositeSerialize(OuterComposite body);
OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite);
/**
*
@@ -69,7 +120,7 @@ public interface FakeApi extends ApiClient.Api {
*/
@RequestLine("POST /fake/outer/number")
@Headers({
"Content-Type: */*",
"Content-Type: application/json",
"Accept: */*",
})
BigDecimal fakeOuterNumberSerialize(BigDecimal body);
@@ -82,35 +133,60 @@ public interface FakeApi extends ApiClient.Api {
*/
@RequestLine("POST /fake/outer/string")
@Headers({
"Content-Type: */*",
"Content-Type: application/json",
"Accept: */*",
})
String fakeOuterStringSerialize(String body);
/**
*
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param body (required)
* Test serialization of enum (int) properties with examples
* @param outerObjectWithEnumProperty Input enum (int) as post body (required)
* @return OuterObjectWithEnumProperty
*/
@RequestLine("POST /fake/property/enum-int")
@Headers({
"Content-Type: application/json",
"Accept: */*",
})
OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty);
/**
*
* For this test, the body has to be a binary file.
* @param body image to upload (required)
*/
@RequestLine("PUT /fake/body-with-binary")
@Headers({
"Content-Type: image/png",
"Accept: application/json",
})
void testBodyWithBinary(File body);
/**
*
* For this test, the body for this request must reference a schema named &#x60;File&#x60;.
* @param fileSchemaTestClass (required)
*/
@RequestLine("PUT /fake/body-with-file-schema")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
void testBodyWithFileSchema(FileSchemaTestClass body);
void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass);
/**
*
*
* @param query (required)
* @param body (required)
* @param user (required)
*/
@RequestLine("PUT /fake/body-with-query-params?query={query}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
void testBodyWithQueryParams(@Param("query") String query, User body);
void testBodyWithQueryParams(@Param("query") String query, User user);
/**
*
@@ -120,7 +196,7 @@ public interface FakeApi extends ApiClient.Api {
* is convenient for services with optional query parameters, especially when
* used with the {@link TestBodyWithQueryParamsQueryParams} class that allows for
* building up this map in a fluent style.
* @param body (required)
* @param user (required)
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
@@ -132,7 +208,7 @@ public interface FakeApi extends ApiClient.Api {
"Content-Type: application/json",
"Accept: application/json",
})
void testBodyWithQueryParams(User body, @QueryMap(encoded=true) Map<String, Object> queryParams);
void testBodyWithQueryParams(User user, @QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the
@@ -148,7 +224,7 @@ public interface FakeApi extends ApiClient.Api {
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param body client model (required)
* @param client client model (required)
* @return Client
*/
@RequestLine("PATCH /fake")
@@ -156,11 +232,11 @@ public interface FakeApi extends ApiClient.Api {
"Content-Type: application/json",
"Accept: application/json",
})
Client testClientModel(Client body);
Client testClientModel(Client client);
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* @param number None (required)
* @param _double None (required)
* @param patternWithoutDelimiter None (required)
@@ -242,7 +318,7 @@ public interface FakeApi extends ApiClient.Api {
*/
public static class TestEnumParametersQueryParams extends HashMap<String, Object> {
public TestEnumParametersQueryParams enumQueryStringArray(final List<String> value) {
put("enum_query_string_array", EncodingUtils.encodeCollection(value, "csv"));
put("enum_query_string_array", EncodingUtils.encodeCollection(value, "multi"));
return this;
}
public TestEnumParametersQueryParams enumQueryString(final String value) {
@@ -332,14 +408,14 @@ public interface FakeApi extends ApiClient.Api {
/**
* test inline additionalProperties
*
* @param param request body (required)
* @param requestBody request body (required)
*/
@RequestLine("POST /fake/inline-additionalProperties")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
void testInlineAdditionalProperties(Map<String, String> param);
void testInlineAdditionalProperties(Map<String, String> requestBody);
/**
* test json serialization of form data
@@ -399,7 +475,7 @@ public interface FakeApi extends ApiClient.Api {
*/
public static class TestQueryParameterCollectionFormatQueryParams extends HashMap<String, Object> {
public TestQueryParameterCollectionFormatQueryParams pipe(final List<String> value) {
put("pipe", EncodingUtils.encodeCollection(value, "csv"));
put("pipe", EncodingUtils.encodeCollection(value, "pipes"));
return this;
}
public TestQueryParameterCollectionFormatQueryParams ioutil(final List<String> value) {

View File

@@ -18,7 +18,7 @@ public interface FakeClassnameTags123Api extends ApiClient.Api {
/**
* To test class name in snake case
* To test class name in snake case
* @param body client model (required)
* @param client client model (required)
* @return Client
*/
@RequestLine("PATCH /fake_classname_test")
@@ -26,5 +26,5 @@ public interface FakeClassnameTags123Api extends ApiClient.Api {
"Content-Type: application/json",
"Accept: application/json",
})
Client testClassname(Client body);
Client testClassname(Client client);
}

View File

@@ -21,14 +21,14 @@ public interface PetApi extends ApiClient.Api {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (required)
* @param pet Pet object that needs to be added to the store (required)
*/
@RequestLine("POST /pet")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
void addPet(Pet body);
void addPet(Pet pet);
/**
* Deletes a pet
@@ -150,14 +150,14 @@ public interface PetApi extends ApiClient.Api {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (required)
* @param pet Pet object that needs to be added to the store (required)
*/
@RequestLine("PUT /pet")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
void updatePet(Pet body);
void updatePet(Pet pet);
/**
* Updates a pet in the store with form data

View File

@@ -52,13 +52,13 @@ public interface StoreApi extends ApiClient.Api {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet (required)
* @param order order placed for purchasing the pet (required)
* @return Order
*/
@RequestLine("POST /store/order")
@Headers({
"Content-Type: */*",
"Content-Type: application/json",
"Accept: application/json",
})
Order placeOrder(Order body);
Order placeOrder(Order order);
}

View File

@@ -18,38 +18,38 @@ public interface UserApi extends ApiClient.Api {
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object (required)
* @param user Created user object (required)
*/
@RequestLine("POST /user")
@Headers({
"Content-Type: */*",
"Content-Type: application/json",
"Accept: application/json",
})
void createUser(User body);
void createUser(User user);
/**
* Creates list of users with given input array
*
* @param body List of user object (required)
* @param user List of user object (required)
*/
@RequestLine("POST /user/createWithArray")
@Headers({
"Content-Type: */*",
"Content-Type: application/json",
"Accept: application/json",
})
void createUsersWithArrayInput(List<User> body);
void createUsersWithArrayInput(List<User> user);
/**
* Creates list of users with given input array
*
* @param body List of user object (required)
* @param user List of user object (required)
*/
@RequestLine("POST /user/createWithList")
@Headers({
"Content-Type: */*",
"Content-Type: application/json",
"Accept: application/json",
})
void createUsersWithListInput(List<User> body);
void createUsersWithListInput(List<User> user);
/**
* Delete user
@@ -138,12 +138,12 @@ public interface UserApi extends ApiClient.Api {
* Updated user
* This can only be done by the logged in user.
* @param username name that need to be deleted (required)
* @param body Updated user object (required)
* @param user Updated user object (required)
*/
@RequestLine("PUT /user/{username}")
@Headers({
"Content-Type: */*",
"Content-Type: application/json",
"Accept: application/json",
})
void updateUser(@Param("username") String username, User body);
void updateUser(@Param("username") String username, User user);
}

View File

@@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -32,413 +31,86 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
* AdditionalPropertiesClass
*/
@JsonPropertyOrder({
AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3
AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY
})
@JsonTypeName("AdditionalPropertiesClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP_STRING = "map_string";
private Map<String, String> mapString = null;
public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property";
private Map<String, String> mapProperty = null;
public static final String JSON_PROPERTY_MAP_NUMBER = "map_number";
private Map<String, BigDecimal> mapNumber = null;
public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer";
private Map<String, Integer> mapInteger = null;
public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean";
private Map<String, Boolean> mapBoolean = null;
public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer";
private Map<String, List<Integer>> mapArrayInteger = null;
public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype";
private Map<String, List<Object>> mapArrayAnytype = null;
public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string";
private Map<String, Map<String, String>> mapMapString = null;
public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype";
private Map<String, Map<String, Object>> mapMapAnytype = null;
public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1";
private Object anytype1;
public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2";
private Object anytype2;
public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3";
private Object anytype3;
public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property";
private Map<String, Map<String, String>> mapOfMapProperty = null;
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapString = mapString;
this.mapProperty = mapProperty;
return this;
}
public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
if (this.mapString == null) {
this.mapString = new HashMap<String, String>();
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapString.put(key, mapStringItem);
this.mapProperty.put(key, mapPropertyItem);
return this;
}
/**
* Get mapString
* @return mapString
* Get mapProperty
* @return mapProperty
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_STRING)
@JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, String> getMapString() {
return mapString;
public Map<String, String> getMapProperty() {
return mapProperty;
}
@JsonProperty(JSON_PROPERTY_MAP_STRING)
@JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapString(Map<String, String> mapString) {
this.mapString = mapString;
public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
}
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) {
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapNumber = mapNumber;
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
if (this.mapNumber == null) {
this.mapNumber = new HashMap<String, BigDecimal>();
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapNumber.put(key, mapNumberItem);
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}
/**
* Get mapNumber
* @return mapNumber
* Get mapOfMapProperty
* @return mapOfMapProperty
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_NUMBER)
@JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, BigDecimal> getMapNumber() {
return mapNumber;
public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
}
@JsonProperty(JSON_PROPERTY_MAP_NUMBER)
@JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
}
public AdditionalPropertiesClass mapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
return this;
}
public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
if (this.mapInteger == null) {
this.mapInteger = new HashMap<String, Integer>();
}
this.mapInteger.put(key, mapIntegerItem);
return this;
}
/**
* Get mapInteger
* @return mapInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Integer> getMapInteger() {
return mapInteger;
}
@JsonProperty(JSON_PROPERTY_MAP_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
}
public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
return this;
}
public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
if (this.mapBoolean == null) {
this.mapBoolean = new HashMap<String, Boolean>();
}
this.mapBoolean.put(key, mapBooleanItem);
return this;
}
/**
* Get mapBoolean
* @return mapBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_BOOLEAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getMapBoolean() {
return mapBoolean;
}
@JsonProperty(JSON_PROPERTY_MAP_BOOLEAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
}
public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
return this;
}
public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List<Integer> mapArrayIntegerItem) {
if (this.mapArrayInteger == null) {
this.mapArrayInteger = new HashMap<String, List<Integer>>();
}
this.mapArrayInteger.put(key, mapArrayIntegerItem);
return this;
}
/**
* Get mapArrayInteger
* @return mapArrayInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, List<Integer>> getMapArrayInteger() {
return mapArrayInteger;
}
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
}
public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
return this;
}
public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List<Object> mapArrayAnytypeItem) {
if (this.mapArrayAnytype == null) {
this.mapArrayAnytype = new HashMap<String, List<Object>>();
}
this.mapArrayAnytype.put(key, mapArrayAnytypeItem);
return this;
}
/**
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, List<Object>> getMapArrayAnytype() {
return mapArrayAnytype;
}
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
}
public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
return this;
}
public AdditionalPropertiesClass putMapMapStringItem(String key, Map<String, String> mapMapStringItem) {
if (this.mapMapString == null) {
this.mapMapString = new HashMap<String, Map<String, String>>();
}
this.mapMapString.put(key, mapMapStringItem);
return this;
}
/**
* Get mapMapString
* @return mapMapString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, String>> getMapMapString() {
return mapMapString;
}
@JsonProperty(JSON_PROPERTY_MAP_MAP_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
}
public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
return this;
}
public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map<String, Object> mapMapAnytypeItem) {
if (this.mapMapAnytype == null) {
this.mapMapAnytype = new HashMap<String, Map<String, Object>>();
}
this.mapMapAnytype.put(key, mapMapAnytypeItem);
return this;
}
/**
* Get mapMapAnytype
* @return mapMapAnytype
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, Object>> getMapMapAnytype() {
return mapMapAnytype;
}
@JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
}
public AdditionalPropertiesClass anytype1(Object anytype1) {
this.anytype1 = anytype1;
return this;
}
/**
* Get anytype1
* @return anytype1
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE1)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype1() {
return anytype1;
}
@JsonProperty(JSON_PROPERTY_ANYTYPE1)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAnytype1(Object anytype1) {
this.anytype1 = anytype1;
}
public AdditionalPropertiesClass anytype2(Object anytype2) {
this.anytype2 = anytype2;
return this;
}
/**
* Get anytype2
* @return anytype2
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE2)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype2() {
return anytype2;
}
@JsonProperty(JSON_PROPERTY_ANYTYPE2)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAnytype2(Object anytype2) {
this.anytype2 = anytype2;
}
public AdditionalPropertiesClass anytype3(Object anytype3) {
this.anytype3 = anytype3;
return this;
}
/**
* Get anytype3
* @return anytype3
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE3)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype3() {
return anytype3;
}
@JsonProperty(JSON_PROPERTY_ANYTYPE3)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAnytype3(Object anytype3) {
this.anytype3 = anytype3;
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
@@ -451,39 +123,21 @@ public class AdditionalPropertiesClass {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapString, additionalPropertiesClass.mapString) &&
Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) &&
Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) &&
Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) &&
Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) &&
Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) &&
Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) &&
Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) &&
Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) &&
Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) &&
Objects.equals(this.anytype3, additionalPropertiesClass.anytype3);
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
}
@Override
public int hashCode() {
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n");
sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n");
sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n");
sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n");
sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n");
sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n");
sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n");
sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n");
sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n");
sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n");
sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n");
sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
@@ -40,7 +39,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
})

View File

@@ -25,7 +25,6 @@ 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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
@@ -38,9 +37,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonTypeName("Cat")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
})
public class Cat extends Animal {
public static final String JSON_PROPERTY_DECLAWED = "declawed";

View File

@@ -0,0 +1,107 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* DeprecatedObject
* @deprecated
*/
@Deprecated
@JsonPropertyOrder({
DeprecatedObject.JSON_PROPERTY_NAME
})
@JsonTypeName("DeprecatedObject")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class DeprecatedObject {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public DeprecatedObject name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeprecatedObject deprecatedObject = (DeprecatedObject) o;
return Objects.equals(this.name, deprecatedObject.name);
}
@Override
public int hashCode() {
return Objects.hash(name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeprecatedObject {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -23,6 +23,12 @@ import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.OuterEnum;
import org.openapitools.client.model.OuterEnumDefaultValue;
import org.openapitools.client.model.OuterEnumInteger;
import org.openapitools.client.model.OuterEnumIntegerDefaultValue;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
@@ -33,7 +39,10 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED,
EnumTest.JSON_PROPERTY_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_ENUM_NUMBER,
EnumTest.JSON_PROPERTY_OUTER_ENUM
EnumTest.JSON_PROPERTY_OUTER_ENUM,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE
})
@JsonTypeName("Enum_Test")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@@ -195,7 +204,16 @@ public class EnumTest {
private EnumNumberEnum enumNumber;
public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum";
private OuterEnum outerEnum;
private JsonNullable<OuterEnum> outerEnum = JsonNullable.<OuterEnum>undefined();
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger";
private OuterEnumInteger outerEnumInteger;
public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue";
private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED;
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue";
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0;
public EnumTest enumString(EnumStringEnum enumString) {
@@ -307,8 +325,8 @@ public class EnumTest {
public EnumTest outerEnum(OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
this.outerEnum = outerEnum;
return this;
}
@@ -318,18 +336,107 @@ public class EnumTest {
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public OuterEnum getOuterEnum() {
return outerEnum.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnum getOuterEnum() {
public JsonNullable<OuterEnum> getOuterEnum_JsonNullable() {
return outerEnum;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
public void setOuterEnum_JsonNullable(JsonNullable<OuterEnum> outerEnum) {
this.outerEnum = outerEnum;
}
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
return this;
}
/**
* Get outerEnumInteger
* @return outerEnumInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
public OuterEnumInteger getOuterEnumInteger() {
return outerEnumInteger;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
}
public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
return this;
}
/**
* Get outerEnumDefaultValue
* @return outerEnumDefaultValue
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumDefaultValue getOuterEnumDefaultValue() {
return outerEnumDefaultValue;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
}
public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
return this;
}
/**
* Get outerEnumIntegerDefaultValue
* @return outerEnumIntegerDefaultValue
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() {
return outerEnumIntegerDefaultValue;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
}
@@ -346,12 +453,15 @@ public class EnumTest {
Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
Objects.equals(this.outerEnum, enumTest.outerEnum) &&
Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) &&
Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) &&
Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue);
}
@Override
public int hashCode() {
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum, outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue);
}
@Override
@@ -363,6 +473,9 @@ public class EnumTest {
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n");
sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n");
sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -0,0 +1,105 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Foo
*/
@JsonPropertyOrder({
Foo.JSON_PROPERTY_BAR
})
@JsonTypeName("Foo")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Foo {
public static final String JSON_PROPERTY_BAR = "bar";
private String bar = "bar";
public Foo bar(String bar) {
this.bar = bar;
return this;
}
/**
* Get bar
* @return bar
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBar() {
return bar;
}
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBar(String bar) {
this.bar = bar;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Foo foo = (Foo) o;
return Objects.equals(this.bar, foo.bar);
}
@Override
public int hashCode() {
return Objects.hash(bar);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Foo {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -39,6 +39,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
FormatTest.JSON_PROPERTY_NUMBER,
FormatTest.JSON_PROPERTY_FLOAT,
FormatTest.JSON_PROPERTY_DOUBLE,
FormatTest.JSON_PROPERTY_DECIMAL,
FormatTest.JSON_PROPERTY_STRING,
FormatTest.JSON_PROPERTY_BYTE,
FormatTest.JSON_PROPERTY_BINARY,
@@ -46,7 +47,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
FormatTest.JSON_PROPERTY_DATE_TIME,
FormatTest.JSON_PROPERTY_UUID,
FormatTest.JSON_PROPERTY_PASSWORD,
FormatTest.JSON_PROPERTY_BIG_DECIMAL
FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS,
FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER
})
@JsonTypeName("format_test")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@@ -69,6 +71,9 @@ public class FormatTest {
public static final String JSON_PROPERTY_DOUBLE = "double";
private Double _double;
public static final String JSON_PROPERTY_DECIMAL = "decimal";
private BigDecimal decimal;
public static final String JSON_PROPERTY_STRING = "string";
private String string;
@@ -90,8 +95,11 @@ public class FormatTest {
public static final String JSON_PROPERTY_PASSWORD = "password";
private String password;
public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal";
private BigDecimal bigDecimal;
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits";
private String patternWithDigits;
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter";
private String patternWithDigitsAndDelimiter;
public FormatTest integer(Integer integer) {
@@ -266,6 +274,33 @@ public class FormatTest {
}
public FormatTest decimal(BigDecimal decimal) {
this.decimal = decimal;
return this;
}
/**
* Get decimal
* @return decimal
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DECIMAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getDecimal() {
return decimal;
}
@JsonProperty(JSON_PROPERTY_DECIMAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDecimal(BigDecimal decimal) {
this.decimal = decimal;
}
public FormatTest string(String string) {
this.string = string;
@@ -455,30 +490,57 @@ public class FormatTest {
}
public FormatTest bigDecimal(BigDecimal bigDecimal) {
public FormatTest patternWithDigits(String patternWithDigits) {
this.bigDecimal = bigDecimal;
this.patternWithDigits = patternWithDigits;
return this;
}
/**
* Get bigDecimal
* @return bigDecimal
* A string that is a 10 digit number. Can have leading zeros.
* @return patternWithDigits
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BIG_DECIMAL)
@ApiModelProperty(value = "A string that is a 10 digit number. Can have leading zeros.")
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getBigDecimal() {
return bigDecimal;
public String getPatternWithDigits() {
return patternWithDigits;
}
@JsonProperty(JSON_PROPERTY_BIG_DECIMAL)
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
public void setPatternWithDigits(String patternWithDigits) {
this.patternWithDigits = patternWithDigits;
}
public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
return this;
}
/**
* A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01.
* @return patternWithDigitsAndDelimiter
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPatternWithDigitsAndDelimiter() {
return patternWithDigitsAndDelimiter;
}
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
}
@@ -497,6 +559,7 @@ public class FormatTest {
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.decimal, formatTest.decimal) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
@@ -504,12 +567,13 @@ public class FormatTest {
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password) &&
Objects.equals(this.bigDecimal, formatTest.bigDecimal);
Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) &&
Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal);
return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
}
@Override
@@ -522,6 +586,7 @@ public class FormatTest {
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
@@ -529,7 +594,8 @@ public class FormatTest {
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n");
sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n");
sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -0,0 +1,117 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
*/
@ApiModel(description = "Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.")
@JsonPropertyOrder({
HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE
})
@JsonTypeName("HealthCheckResult")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class HealthCheckResult {
public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage";
private JsonNullable<String> nullableMessage = JsonNullable.<String>undefined();
public HealthCheckResult nullableMessage(String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
return this;
}
/**
* Get nullableMessage
* @return nullableMessage
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getNullableMessage() {
return nullableMessage.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getNullableMessage_JsonNullable() {
return nullableMessage;
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
public void setNullableMessage_JsonNullable(JsonNullable<String> nullableMessage) {
this.nullableMessage = nullableMessage;
}
public void setNullableMessage(String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HealthCheckResult healthCheckResult = (HealthCheckResult) o;
return Objects.equals(this.nullableMessage, healthCheckResult.nullableMessage);
}
@Override
public int hashCode() {
return Objects.hash(nullableMessage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HealthCheckResult {\n");
sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,106 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Foo;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* InlineResponseDefault
*/
@JsonPropertyOrder({
InlineResponseDefault.JSON_PROPERTY_STRING
})
@JsonTypeName("inline_response_default")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class InlineResponseDefault {
public static final String JSON_PROPERTY_STRING = "string";
private Foo string;
public InlineResponseDefault string(Foo string) {
this.string = string;
return this;
}
/**
* Get string
* @return string
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Foo getString() {
return string;
}
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setString(Foo string) {
this.string = string;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponseDefault inlineResponseDefault = (InlineResponseDefault) o;
return Objects.equals(this.string, inlineResponseDefault.string);
}
@Override
public int hashCode() {
return Objects.hash(string);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponseDefault {\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,624 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* NullableClass
*/
@JsonPropertyOrder({
NullableClass.JSON_PROPERTY_INTEGER_PROP,
NullableClass.JSON_PROPERTY_NUMBER_PROP,
NullableClass.JSON_PROPERTY_BOOLEAN_PROP,
NullableClass.JSON_PROPERTY_STRING_PROP,
NullableClass.JSON_PROPERTY_DATE_PROP,
NullableClass.JSON_PROPERTY_DATETIME_PROP,
NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE,
NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE
})
@JsonTypeName("NullableClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class NullableClass extends HashMap<String, Object> {
public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop";
private JsonNullable<Integer> integerProp = JsonNullable.<Integer>undefined();
public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop";
private JsonNullable<BigDecimal> numberProp = JsonNullable.<BigDecimal>undefined();
public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop";
private JsonNullable<Boolean> booleanProp = JsonNullable.<Boolean>undefined();
public static final String JSON_PROPERTY_STRING_PROP = "string_prop";
private JsonNullable<String> stringProp = JsonNullable.<String>undefined();
public static final String JSON_PROPERTY_DATE_PROP = "date_prop";
private JsonNullable<LocalDate> dateProp = JsonNullable.<LocalDate>undefined();
public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop";
private JsonNullable<OffsetDateTime> datetimeProp = JsonNullable.<OffsetDateTime>undefined();
public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop";
private JsonNullable<List<Object>> arrayNullableProp = JsonNullable.<List<Object>>undefined();
public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop";
private JsonNullable<List<Object>> arrayAndItemsNullableProp = JsonNullable.<List<Object>>undefined();
public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable";
private List<Object> arrayItemsNullable = null;
public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop";
private JsonNullable<Map<String, Object>> objectNullableProp = JsonNullable.<Map<String, Object>>undefined();
public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop";
private JsonNullable<Map<String, Object>> objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>undefined();
public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable";
private Map<String, Object> objectItemsNullable = null;
public NullableClass integerProp(Integer integerProp) {
this.integerProp = JsonNullable.<Integer>of(integerProp);
return this;
}
/**
* Get integerProp
* @return integerProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Integer getIntegerProp() {
return integerProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_INTEGER_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Integer> getIntegerProp_JsonNullable() {
return integerProp;
}
@JsonProperty(JSON_PROPERTY_INTEGER_PROP)
public void setIntegerProp_JsonNullable(JsonNullable<Integer> integerProp) {
this.integerProp = integerProp;
}
public void setIntegerProp(Integer integerProp) {
this.integerProp = JsonNullable.<Integer>of(integerProp);
}
public NullableClass numberProp(BigDecimal numberProp) {
this.numberProp = JsonNullable.<BigDecimal>of(numberProp);
return this;
}
/**
* Get numberProp
* @return numberProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public BigDecimal getNumberProp() {
return numberProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NUMBER_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<BigDecimal> getNumberProp_JsonNullable() {
return numberProp;
}
@JsonProperty(JSON_PROPERTY_NUMBER_PROP)
public void setNumberProp_JsonNullable(JsonNullable<BigDecimal> numberProp) {
this.numberProp = numberProp;
}
public void setNumberProp(BigDecimal numberProp) {
this.numberProp = JsonNullable.<BigDecimal>of(numberProp);
}
public NullableClass booleanProp(Boolean booleanProp) {
this.booleanProp = JsonNullable.<Boolean>of(booleanProp);
return this;
}
/**
* Get booleanProp
* @return booleanProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Boolean isBooleanProp() {
return booleanProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_BOOLEAN_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Boolean> isBooleanProp_JsonNullable() {
return booleanProp;
}
@JsonProperty(JSON_PROPERTY_BOOLEAN_PROP)
public void setBooleanProp_JsonNullable(JsonNullable<Boolean> booleanProp) {
this.booleanProp = booleanProp;
}
public void setBooleanProp(Boolean booleanProp) {
this.booleanProp = JsonNullable.<Boolean>of(booleanProp);
}
public NullableClass stringProp(String stringProp) {
this.stringProp = JsonNullable.<String>of(stringProp);
return this;
}
/**
* Get stringProp
* @return stringProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getStringProp() {
return stringProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_STRING_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getStringProp_JsonNullable() {
return stringProp;
}
@JsonProperty(JSON_PROPERTY_STRING_PROP)
public void setStringProp_JsonNullable(JsonNullable<String> stringProp) {
this.stringProp = stringProp;
}
public void setStringProp(String stringProp) {
this.stringProp = JsonNullable.<String>of(stringProp);
}
public NullableClass dateProp(LocalDate dateProp) {
this.dateProp = JsonNullable.<LocalDate>of(dateProp);
return this;
}
/**
* Get dateProp
* @return dateProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public LocalDate getDateProp() {
return dateProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DATE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<LocalDate> getDateProp_JsonNullable() {
return dateProp;
}
@JsonProperty(JSON_PROPERTY_DATE_PROP)
public void setDateProp_JsonNullable(JsonNullable<LocalDate> dateProp) {
this.dateProp = dateProp;
}
public void setDateProp(LocalDate dateProp) {
this.dateProp = JsonNullable.<LocalDate>of(dateProp);
}
public NullableClass datetimeProp(OffsetDateTime datetimeProp) {
this.datetimeProp = JsonNullable.<OffsetDateTime>of(datetimeProp);
return this;
}
/**
* Get datetimeProp
* @return datetimeProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public OffsetDateTime getDatetimeProp() {
return datetimeProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DATETIME_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getDatetimeProp_JsonNullable() {
return datetimeProp;
}
@JsonProperty(JSON_PROPERTY_DATETIME_PROP)
public void setDatetimeProp_JsonNullable(JsonNullable<OffsetDateTime> datetimeProp) {
this.datetimeProp = datetimeProp;
}
public void setDatetimeProp(OffsetDateTime datetimeProp) {
this.datetimeProp = JsonNullable.<OffsetDateTime>of(datetimeProp);
}
public NullableClass arrayNullableProp(List<Object> arrayNullableProp) {
this.arrayNullableProp = JsonNullable.<List<Object>>of(arrayNullableProp);
return this;
}
public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) {
if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) {
this.arrayNullableProp = JsonNullable.<List<Object>>of(new ArrayList<Object>());
}
try {
this.arrayNullableProp.get().add(arrayNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get arrayNullableProp
* @return arrayNullableProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public List<Object> getArrayNullableProp() {
return arrayNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<Object>> getArrayNullableProp_JsonNullable() {
return arrayNullableProp;
}
@JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP)
public void setArrayNullableProp_JsonNullable(JsonNullable<List<Object>> arrayNullableProp) {
this.arrayNullableProp = arrayNullableProp;
}
public void setArrayNullableProp(List<Object> arrayNullableProp) {
this.arrayNullableProp = JsonNullable.<List<Object>>of(arrayNullableProp);
}
public NullableClass arrayAndItemsNullableProp(List<Object> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(arrayAndItemsNullableProp);
return this;
}
public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) {
if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) {
this.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(new ArrayList<Object>());
}
try {
this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get arrayAndItemsNullableProp
* @return arrayAndItemsNullableProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public List<Object> getArrayAndItemsNullableProp() {
return arrayAndItemsNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<Object>> getArrayAndItemsNullableProp_JsonNullable() {
return arrayAndItemsNullableProp;
}
@JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP)
public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable<List<Object>> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = arrayAndItemsNullableProp;
}
public void setArrayAndItemsNullableProp(List<Object> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(arrayAndItemsNullableProp);
}
public NullableClass arrayItemsNullable(List<Object> arrayItemsNullable) {
this.arrayItemsNullable = arrayItemsNullable;
return this;
}
public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) {
if (this.arrayItemsNullable == null) {
this.arrayItemsNullable = new ArrayList<Object>();
}
this.arrayItemsNullable.add(arrayItemsNullableItem);
return this;
}
/**
* Get arrayItemsNullable
* @return arrayItemsNullable
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<Object> getArrayItemsNullable() {
return arrayItemsNullable;
}
@JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayItemsNullable(List<Object> arrayItemsNullable) {
this.arrayItemsNullable = arrayItemsNullable;
}
public NullableClass objectNullableProp(Map<String, Object> objectNullableProp) {
this.objectNullableProp = JsonNullable.<Map<String, Object>>of(objectNullableProp);
return this;
}
public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) {
if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) {
this.objectNullableProp = JsonNullable.<Map<String, Object>>of(new HashMap<String, Object>());
}
try {
this.objectNullableProp.get().put(key, objectNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get objectNullableProp
* @return objectNullableProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Map<String, Object> getObjectNullableProp() {
return objectNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Map<String, Object>> getObjectNullableProp_JsonNullable() {
return objectNullableProp;
}
@JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP)
public void setObjectNullableProp_JsonNullable(JsonNullable<Map<String, Object>> objectNullableProp) {
this.objectNullableProp = objectNullableProp;
}
public void setObjectNullableProp(Map<String, Object> objectNullableProp) {
this.objectNullableProp = JsonNullable.<Map<String, Object>>of(objectNullableProp);
}
public NullableClass objectAndItemsNullableProp(Map<String, Object> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(objectAndItemsNullableProp);
return this;
}
public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) {
if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) {
this.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(new HashMap<String, Object>());
}
try {
this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get objectAndItemsNullableProp
* @return objectAndItemsNullableProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Map<String, Object> getObjectAndItemsNullableProp() {
return objectAndItemsNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Map<String, Object>> getObjectAndItemsNullableProp_JsonNullable() {
return objectAndItemsNullableProp;
}
@JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP)
public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable<Map<String, Object>> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = objectAndItemsNullableProp;
}
public void setObjectAndItemsNullableProp(Map<String, Object> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(objectAndItemsNullableProp);
}
public NullableClass objectItemsNullable(Map<String, Object> objectItemsNullable) {
this.objectItemsNullable = objectItemsNullable;
return this;
}
public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) {
if (this.objectItemsNullable == null) {
this.objectItemsNullable = new HashMap<String, Object>();
}
this.objectItemsNullable.put(key, objectItemsNullableItem);
return this;
}
/**
* Get objectItemsNullable
* @return objectItemsNullable
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Object> getObjectItemsNullable() {
return objectItemsNullable;
}
@JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public void setObjectItemsNullable(Map<String, Object> objectItemsNullable) {
this.objectItemsNullable = objectItemsNullable;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NullableClass nullableClass = (NullableClass) o;
return Objects.equals(this.integerProp, nullableClass.integerProp) &&
Objects.equals(this.numberProp, nullableClass.numberProp) &&
Objects.equals(this.booleanProp, nullableClass.booleanProp) &&
Objects.equals(this.stringProp, nullableClass.stringProp) &&
Objects.equals(this.dateProp, nullableClass.dateProp) &&
Objects.equals(this.datetimeProp, nullableClass.datetimeProp) &&
Objects.equals(this.arrayNullableProp, nullableClass.arrayNullableProp) &&
Objects.equals(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) &&
Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) &&
Objects.equals(this.objectNullableProp, nullableClass.objectNullableProp) &&
Objects.equals(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) &&
Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(integerProp, numberProp, booleanProp, stringProp, dateProp, datetimeProp, arrayNullableProp, arrayAndItemsNullableProp, arrayItemsNullable, objectNullableProp, objectAndItemsNullableProp, objectItemsNullable, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NullableClass {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n");
sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n");
sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n");
sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n");
sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n");
sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n");
sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n");
sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n");
sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n");
sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n");
sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n");
sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,222 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.DeprecatedObject;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* ObjectWithDeprecatedFields
*/
@JsonPropertyOrder({
ObjectWithDeprecatedFields.JSON_PROPERTY_UUID,
ObjectWithDeprecatedFields.JSON_PROPERTY_ID,
ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF,
ObjectWithDeprecatedFields.JSON_PROPERTY_BARS
})
@JsonTypeName("ObjectWithDeprecatedFields")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ObjectWithDeprecatedFields {
public static final String JSON_PROPERTY_UUID = "uuid";
private String uuid;
public static final String JSON_PROPERTY_ID = "id";
private BigDecimal id;
public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef";
private DeprecatedObject deprecatedRef;
public static final String JSON_PROPERTY_BARS = "bars";
private List<String> bars = null;
public ObjectWithDeprecatedFields uuid(String uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getUuid() {
return uuid;
}
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUuid(String uuid) {
this.uuid = uuid;
}
public ObjectWithDeprecatedFields id(BigDecimal id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
* @deprecated
**/
@Deprecated
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(BigDecimal id) {
this.id = id;
}
public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) {
this.deprecatedRef = deprecatedRef;
return this;
}
/**
* Get deprecatedRef
* @return deprecatedRef
* @deprecated
**/
@Deprecated
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DEPRECATED_REF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DeprecatedObject getDeprecatedRef() {
return deprecatedRef;
}
@JsonProperty(JSON_PROPERTY_DEPRECATED_REF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeprecatedRef(DeprecatedObject deprecatedRef) {
this.deprecatedRef = deprecatedRef;
}
public ObjectWithDeprecatedFields bars(List<String> bars) {
this.bars = bars;
return this;
}
public ObjectWithDeprecatedFields addBarsItem(String barsItem) {
if (this.bars == null) {
this.bars = new ArrayList<String>();
}
this.bars.add(barsItem);
return this;
}
/**
* Get bars
* @return bars
* @deprecated
**/
@Deprecated
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BARS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getBars() {
return bars;
}
@JsonProperty(JSON_PROPERTY_BARS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBars(List<String> bars) {
this.bars = bars;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o;
return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) &&
Objects.equals(this.id, objectWithDeprecatedFields.id) &&
Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) &&
Objects.equals(this.bars, objectWithDeprecatedFields.bars);
}
@Override
public int hashCode() {
return Objects.hash(uuid, id, deprecatedRef, bars);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ObjectWithDeprecatedFields {\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n");
sb.append(" bars: ").append(toIndentedString(bars)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -54,7 +54,7 @@ public enum OuterEnum {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
return null;
}
}

View File

@@ -0,0 +1,60 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnumDefaultValue
*/
public enum OuterEnumDefaultValue {
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
private String value;
OuterEnumDefaultValue(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumDefaultValue fromValue(String value) {
for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,60 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnumInteger
*/
public enum OuterEnumInteger {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_2(2);
private Integer value;
OuterEnumInteger(Integer value) {
this.value = value;
}
@JsonValue
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumInteger fromValue(Integer value) {
for (OuterEnumInteger b : OuterEnumInteger.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,60 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnumIntegerDefaultValue
*/
public enum OuterEnumIntegerDefaultValue {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_2(2);
private Integer value;
OuterEnumIntegerDefaultValue(Integer value) {
this.value = value;
}
@JsonValue
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumIntegerDefaultValue fromValue(Integer value) {
for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,105 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.OuterEnumInteger;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* OuterObjectWithEnumProperty
*/
@JsonPropertyOrder({
OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE
})
@JsonTypeName("OuterObjectWithEnumProperty")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class OuterObjectWithEnumProperty {
public static final String JSON_PROPERTY_VALUE = "value";
private OuterEnumInteger value;
public OuterObjectWithEnumProperty value(OuterEnumInteger value) {
this.value = value;
return this;
}
/**
* Get value
* @return value
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public OuterEnumInteger getValue() {
return value;
}
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setValue(OuterEnumInteger value) {
this.value = value;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o;
return Objects.equals(this.value, outerObjectWithEnumProperty.value);
}
@Override
public int hashCode() {
return Objects.hash(value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OuterObjectWithEnumProperty {\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME
})
@JsonTypeName("$special[model.name]")
@JsonTypeName("_special_model.name_")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SpecialModelName {
public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]";
@@ -72,8 +72,8 @@ public class SpecialModelName {
if (o == null || getClass() != o.getClass()) {
return false;
}
SpecialModelName $specialModelName = (SpecialModelName) o;
return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName);
SpecialModelName specialModelName = (SpecialModelName) o;
return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName);
}
@Override

View File

@@ -0,0 +1,39 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.InlineResponseDefault;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for DefaultApi
*/
class DefaultApiTest {
private DefaultApi api;
@BeforeEach
public void setup() {
api = new ApiClient().buildClient(DefaultApi.class);
}
/**
*
*
*
*/
@Test
void fooGetTest() {
// InlineResponseDefault response = api.fooGet();
// TODO: test validations
}
}

View File

@@ -1,321 +1,405 @@
package org.openapitools.client.api;
import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.common.Slf4jNotifier;
import feign.FeignException;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.openapitools.client.ApiClient;
import java.math.BigDecimal;
import org.openapitools.client.model.Client;
import org.openapitools.client.model.OuterComposite;
import org.openapitools.client.model.User;
import org.openapitools.client.model.XmlItem;
import java.io.File;
import org.openapitools.client.model.FileSchemaTestClass;
import org.openapitools.client.model.HealthCheckResult;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.client.model.OuterComposite;
import org.openapitools.client.model.OuterObjectWithEnumProperty;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.User;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.github.tomakehurst.wiremock.client.WireMock.*;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
/**
* API tests for FakeApi
*/
class FakeApiTest {
private static WireMockServer wm = new WireMockServer(options().dynamicPort().notifier(new Slf4jNotifier(true)));
private FakeApi api;
private FakeApi api;
@BeforeEach
public void setup() {
api = new ApiClient().buildClient(FakeApi.class);
}
@BeforeAll
static void startWireMock() {
wm.start();
}
/**
* Health check endpoint
*
*
*/
@Test
void fakeHealthGetTest() {
// HealthCheckResult response = api.fakeHealthGet();
@AfterAll
static void stopWireMock() {
wm.shutdown();
}
// TODO: test validations
}
@BeforeEach
void setUp() {
ApiClient apiClient = new ApiClient();
apiClient.setBasePath(wm.baseUrl());
api = apiClient.buildClient(FakeApi.class);
}
/**
* test http signature authentication
*
*
*/
@Test
void fakeHttpSignatureTestTest() {
Pet pet = null;
String query1 = null;
String header1 = null;
// api.fakeHttpSignatureTest(pet, query1, header1);
@Test
void createXmlItem() {
wm.stubFor(post(urlEqualTo("/fake/create_xml_item"))
.withHeader("Content-Type", equalTo("application/xml"))
.withHeader("Accept", equalTo("application/json"))
.willReturn(ok()));
// TODO: test validations
}
XmlItem xmlItem = new XmlItem();
api.createXmlItem(xmlItem);
}
/**
* test http signature authentication
*
*
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void fakeHttpSignatureTestTestQueryMap() {
Pet pet = null;
String header1 = null;
FakeApi.FakeHttpSignatureTestQueryParams queryParams = new FakeApi.FakeHttpSignatureTestQueryParams()
.query1(null);
// api.fakeHttpSignatureTest(pet, header1, queryParams);
@ParameterizedTest
@ValueSource(strings = {"true", "false"})
void fakeOuterBooleanSerialize(String returnBoolean) {
wm.stubFor(post(urlEqualTo("/fake/outer/boolean"))
.withHeader("Content-Type", equalTo("*/*"))
.withHeader("Accept", equalTo("*/*"))
.willReturn(ok(returnBoolean)));
// TODO: test validations
}
/**
*
*
* Test serialization of outer boolean types
*/
@Test
void fakeOuterBooleanSerializeTest() {
Boolean body = null;
// Boolean response = api.fakeOuterBooleanSerialize(body);
boolean expectedBoolean = Boolean.parseBoolean(returnBoolean);
Boolean aBoolean = api.fakeOuterBooleanSerialize(expectedBoolean);
// TODO: test validations
}
assertThat(aBoolean, is(expectedBoolean));
}
/**
*
*
* Test serialization of object with outer number type
*/
@Test
void fakeOuterCompositeSerializeTest() {
OuterComposite outerComposite = null;
// OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);
@Test
void fakeOuterCompositeSerialize() {
String body = "{\n" +
" \"my_number\": 123.45,\n" +
" \"my_string\":\"Hello\",\n" +
" \"my_boolean\": true\n" +
"}";
wm.stubFor(post(urlEqualTo("/fake/outer/composite"))
.withHeader("Content-Type", equalTo("*/*"))
.withHeader("Accept", equalTo("*/*"))
.withRequestBody(equalToJson(body, true, false))
.willReturn(ok(body)));
// TODO: test validations
}
OuterComposite outerComposite = new OuterComposite();
outerComposite.setMyBoolean(Boolean.TRUE);
outerComposite.setMyNumber(BigDecimal.valueOf(123.45));
outerComposite.setMyString("Hello");
/**
*
*
* Test serialization of outer number types
*/
@Test
void fakeOuterNumberSerializeTest() {
BigDecimal body = null;
// BigDecimal response = api.fakeOuterNumberSerialize(body);
OuterComposite result = api.fakeOuterCompositeSerialize(outerComposite);
// TODO: test validations
}
assertThat(result, is(outerComposite));
}
/**
*
*
* Test serialization of outer string types
*/
@Test
void fakeOuterStringSerializeTest() {
String body = null;
// String response = api.fakeOuterStringSerialize(body);
@Test
void fakeOuterNumberSerialize() {
String body = "123.45";
wm.stubFor(post(urlEqualTo("/fake/outer/number"))
.withHeader("Content-Type", equalTo("*/*"))
.withHeader("Accept", equalTo("*/*"))
.withRequestBody(equalTo(body))
.willReturn(ok(body)));
// TODO: test validations
}
BigDecimal result = api.fakeOuterNumberSerialize(BigDecimal.valueOf(123.45));
/**
*
*
* Test serialization of enum (int) properties with examples
*/
@Test
void fakePropertyEnumIntegerSerializeTest() {
OuterObjectWithEnumProperty outerObjectWithEnumProperty = null;
// OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
assertThat(result, is(result));
}
// TODO: test validations
}
@Test
void fakeOuterStringSerialize() {
String body = "Hello world";
wm.stubFor(post(urlEqualTo("/fake/outer/string"))
.withHeader("Content-Type", equalTo("*/*"))
.withHeader("Accept", equalTo("*/*"))
.withRequestBody(equalTo("\"" + body + "\""))
.willReturn(ok("\"" + body + "\"")));
/**
*
*
* For this test, the body has to be a binary file.
*/
@Test
void testBodyWithBinaryTest() {
File body = null;
// api.testBodyWithBinary(body);
String result = api.fakeOuterStringSerialize(body);
// TODO: test validations
}
assertThat(result, is(body));
}
/**
*
*
* For this test, the body for this request must reference a schema named &#x60;File&#x60;.
*/
@Test
void testBodyWithFileSchemaTest() {
FileSchemaTestClass fileSchemaTestClass = null;
// api.testBodyWithFileSchema(fileSchemaTestClass);
@Test
void testBodyWithFileSchema() throws IOException {
//TODO
}
// TODO: test validations
}
@Test
void testBodyWithQueryParams() {
String body = "{\n" +
" \"id\":123456,\n" +
" \"username\":null,\n" +
" \"firstName\":\"Bruce\",\n" +
" \"lastName\":\"Wayne\",\n" +
" \"email\":\"mail@email.com\",\n" +
" \"password\":\"password\",\n" +
" \"phone\":\"+123 3313131\",\n" +
" \"userStatus\":1\n" +
"}";
/**
*
*
*
*/
@Test
void testBodyWithQueryParamsTest() {
String query = null;
User user = null;
// api.testBodyWithQueryParams(query, user);
wm.stubFor(put(urlEqualTo("/fake/body-with-query-params?query=tags"))
.withHeader("Content-Type", equalTo("application/json"))
.withHeader("Accept", equalTo("application/json"))
.withRequestBody(equalToJson(body))
.willReturn(ok()));
// TODO: test validations
}
User user = new User();
user.setEmail("mail@email.com");
user.setFirstName("Bruce");
user.setLastName("Wayne");
user.setId(123456L);
user.setUserStatus(1);
user.setPassword("password");
user.setPhone("+123 3313131");
/**
*
*
*
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testBodyWithQueryParamsTestQueryMap() {
User user = null;
FakeApi.TestBodyWithQueryParamsQueryParams queryParams = new FakeApi.TestBodyWithQueryParamsQueryParams()
.query(null);
// api.testBodyWithQueryParams(user, queryParams);
api.testBodyWithQueryParams("tags", user);
}
// TODO: test validations
}
/**
* To test \&quot;client\&quot; model
*
* To test \&quot;client\&quot; model
*/
@Test
void testClientModelTest() {
Client client = null;
// Client response = api.testClientModel(client);
@Test
void testBodyWithQueryParamsMap() {
String body = "{\n" +
" \"id\":123456,\n" +
" \"username\":null,\n" +
" \"firstName\":\"Bruce\",\n" +
" \"lastName\":\"Wayne\",\n" +
" \"email\":\"mail@email.com\",\n" +
" \"password\":\"password\",\n" +
" \"phone\":\"+123 3313131\",\n" +
" \"userStatus\":1\n" +
"}";
// TODO: test validations
}
wm.stubFor(put(urlEqualTo("/fake/body-with-query-params?query=value1"))
.withHeader("Content-Type", equalTo("application/json"))
.withHeader("Accept", equalTo("application/json"))
.withRequestBody(equalToJson(body))
.willReturn(ok()));
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*/
@Test
void testEndpointParametersTest() {
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);
User user = new User();
user.setEmail("mail@email.com");
user.setFirstName("Bruce");
user.setLastName("Wayne");
user.setId(123456L);
user.setUserStatus(1);
user.setPassword("password");
user.setPhone("+123 3313131");
// TODO: test validations
}
FakeApi.TestBodyWithQueryParamsQueryParams queryParams = new FakeApi.TestBodyWithQueryParamsQueryParams();
queryParams.query("value1");
/**
* To test enum parameters
*
* To test enum parameters
*/
@Test
void testEnumParametersTest() {
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);
api.testBodyWithQueryParams(user, queryParams);
}
// TODO: test validations
}
@Test
void testClientModel() {
String body = "{\n" +
" \"client\":\"Mr Wayne\"\n" +
"}";
/**
* To test enum parameters
*
* To test enum parameters
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testEnumParametersTestQueryMap() {
List<String> enumHeaderStringArray = null;
String enumHeaderString = null;
List<String> enumFormStringArray = null;
String enumFormString = null;
FakeApi.TestEnumParametersQueryParams queryParams = new FakeApi.TestEnumParametersQueryParams()
.enumQueryStringArray(null)
.enumQueryString(null)
.enumQueryInteger(null)
.enumQueryDouble(null);
// api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumFormStringArray, enumFormString, queryParams);
wm.stubFor(patch(urlEqualTo("/fake"))
.withHeader("Content-Type", equalTo("application/json"))
.withHeader("Accept", equalTo("application/json"))
.withRequestBody(equalToJson(body))
.willReturn(ok(body)));
// TODO: test validations
}
/**
* Fake endpoint to test group parameters (optional)
*
* Fake endpoint to test group parameters (optional)
*/
@Test
void testGroupParametersTest() {
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);
Client client = new Client();
client.setClient("Mr Wayne");
// TODO: test validations
}
Client result = api.testClientModel(client);
/**
* Fake endpoint to test group parameters (optional)
*
* Fake endpoint to test group parameters (optional)
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testGroupParametersTestQueryMap() {
Boolean requiredBooleanGroup = null;
Boolean booleanGroup = null;
FakeApi.TestGroupParametersQueryParams queryParams = new FakeApi.TestGroupParametersQueryParams()
.requiredStringGroup(null)
.requiredInt64Group(null)
.stringGroup(null)
.int64Group(null);
// api.testGroupParameters(requiredBooleanGroup, booleanGroup, queryParams);
assertThat(result.getClient(), is("Mr Wayne"));
}
// TODO: test validations
}
/**
* test inline additionalProperties
*
*
*/
@Test
void testInlineAdditionalPropertiesTest() {
Map<String, String> requestBody = null;
// api.testInlineAdditionalProperties(requestBody);
@Test
void testEndpointParameters() throws IOException {
wm.stubFor(post(urlEqualTo("/fake"))
.withHeader("Content-Type", containing("application/x-www-form-urlencoded"))
.withHeader("Accept", equalTo("application/json"))
.willReturn(ok()));
// TODO: test validations
}
//TODO Cannot serialize bytearray to x-www-form-urlencoded, must use multipart
api.testEndpointParameters(BigDecimal.ONE, 1.0, "abc", null, 123,
1234, 123L, 1.0f, "string", File.createTempFile("testEndpointParameters", "tmp"), LocalDate.now(), OffsetDateTime.now(),
"password", "callback");
}
/**
* test json serialization of form data
*
*
*/
@Test
void testJsonFormDataTest() {
String param = null;
String param2 = null;
// api.testJsonFormData(param, param2);
@Test
void testEnumParameters() {
//TODO GET method does not allow request body
}
// TODO: test validations
}
@Test
void testGroupParameters() {
wm.stubFor(delete(urlEqualTo("/fake?required_string_group=123&required_int64_group=123&string_group=123&int64_group=123"))
.withHeader("Accept", equalTo("application/json"))
.withHeader("required_boolean_group", equalTo("true"))
.withHeader("boolean_group", equalTo("true"))
.willReturn(ok()));
/**
*
*
* To test the collection format in query parameters
*/
@Test
void testQueryParameterCollectionFormatTest() {
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);
api.testGroupParameters(123, true, 123L, 123, true, 123L);
}
// TODO: test validations
}
@Test
void testInlineAdditionalProperties() {
/**
*
*
* To test the collection format in query parameters
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testQueryParameterCollectionFormatTestQueryMap() {
FakeApi.TestQueryParameterCollectionFormatQueryParams queryParams = new FakeApi.TestQueryParameterCollectionFormatQueryParams()
.pipe(null)
.ioutil(null)
.http(null)
.url(null)
.context(null);
// api.testQueryParameterCollectionFormat(queryParams);
wm.stubFor(post(urlEqualTo("/fake/inline-additionalProperties"))
.withHeader("Content-Type", equalTo("application/json"))
.withHeader("Accept", equalTo("application/json"))
.willReturn(ok()));
api.testInlineAdditionalProperties(new HashMap<>());
}
@Test
void testQueryParameterCollectionFormat() {
wm.stubFor(put(urlEqualTo("/fake/test-query-paramters?pipe=pipe1&pipe=pipe2&ioutil=io&http=http&url=url&context=context"))
.withHeader("Accept", equalTo("application/json"))
.willReturn(ok()));
api.testQueryParameterCollectionFormat(Arrays.asList("pipe1", "pipe2"), Arrays.asList("io"), Arrays.asList("http"), Arrays.asList("url"), Arrays.asList("context"));
}
@Test
void testQueryParameterCollectionFormatQueryParams() {
wm.stubFor(put(urlEqualTo("/fake/test-query-paramters?ioutil=io&context=context&http=http&pipe=pipe1&pipe=pipe2&url=url"))
.withHeader("Accept", equalTo("application/json"))
.willReturn(ok()));
HashMap<String, Object> params = new HashMap<>();
params.put("context", Arrays.asList("context"));
params.put("pipe", Arrays.asList("pipe1", "pipe2"));
params.put("ioutil", Arrays.asList("io"));
params.put("http", Arrays.asList("http"));
params.put("url", Arrays.asList("url"));
api.testQueryParameterCollectionFormat(params);
}
@Test
void test404() {
wm.stubFor(post(urlEqualTo("/fake/create_xml_item"))
.withHeader("Content-Type", equalTo("application/xml"))
.withHeader("Accept", equalTo("application/json"))
.willReturn(notFound()));
XmlItem xmlItem = new XmlItem();
assertThrows(FeignException.NotFound.class, () -> api.createXmlItem(xmlItem));
}
@Test
void test500() {
wm.stubFor(post(urlEqualTo("/fake/create_xml_item"))
.withHeader("Content-Type", equalTo("application/xml"))
.withHeader("Accept", equalTo("application/json"))
.willReturn(serverError()));
XmlItem xmlItem = new XmlItem();
assertThrows(FeignException.InternalServerError.class, () -> api.createXmlItem(xmlItem));
}
@Test
void test400() {
wm.stubFor(post(urlEqualTo("/fake/create_xml_item"))
.withHeader("Content-Type", equalTo("application/xml"))
.withHeader("Accept", equalTo("application/json"))
.willReturn(badRequest()));
XmlItem xmlItem = new XmlItem();
assertThrows(FeignException.BadRequest.class, () -> api.createXmlItem(xmlItem));
}
}
// TODO: test validations
}
}

View File

@@ -0,0 +1,48 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
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.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.junit.jupiter.api.Test;
/**
* Model tests for DeprecatedObject
*/
class DeprecatedObjectTest {
private final DeprecatedObject model = new DeprecatedObject();
/**
* Model tests for DeprecatedObject
*/
@Test
void testDeprecatedObject() {
// TODO: test DeprecatedObject
}
/**
* Test the property 'name'
*/
@Test
void nameTest() {
// TODO: test name
}
}

View File

@@ -0,0 +1,48 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
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.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.junit.jupiter.api.Test;
/**
* Model tests for Foo
*/
class FooTest {
private final Foo model = new Foo();
/**
* Model tests for Foo
*/
@Test
void testFoo() {
// TODO: test Foo
}
/**
* Test the property 'bar'
*/
@Test
void barTest() {
// TODO: test bar
}
}

View File

@@ -0,0 +1,51 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
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.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import org.junit.jupiter.api.Test;
/**
* Model tests for HealthCheckResult
*/
class HealthCheckResultTest {
private final HealthCheckResult model = new HealthCheckResult();
/**
* Model tests for HealthCheckResult
*/
@Test
void testHealthCheckResult() {
// TODO: test HealthCheckResult
}
/**
* Test the property 'nullableMessage'
*/
@Test
void nullableMessageTest() {
// TODO: test nullableMessage
}
}

View File

@@ -0,0 +1,49 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
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.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Foo;
import org.junit.jupiter.api.Test;
/**
* Model tests for InlineResponseDefault
*/
class InlineResponseDefaultTest {
private final InlineResponseDefault model = new InlineResponseDefault();
/**
* Model tests for InlineResponseDefault
*/
@Test
void testInlineResponseDefault() {
// TODO: test InlineResponseDefault
}
/**
* Test the property 'string'
*/
@Test
void stringTest() {
// TODO: test string
}
}

View File

@@ -0,0 +1,146 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
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.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import org.junit.jupiter.api.Test;
/**
* Model tests for NullableClass
*/
class NullableClassTest {
private final NullableClass model = new NullableClass();
/**
* Model tests for NullableClass
*/
@Test
void testNullableClass() {
// TODO: test NullableClass
}
/**
* Test the property 'integerProp'
*/
@Test
void integerPropTest() {
// TODO: test integerProp
}
/**
* Test the property 'numberProp'
*/
@Test
void numberPropTest() {
// TODO: test numberProp
}
/**
* Test the property 'booleanProp'
*/
@Test
void booleanPropTest() {
// TODO: test booleanProp
}
/**
* Test the property 'stringProp'
*/
@Test
void stringPropTest() {
// TODO: test stringProp
}
/**
* Test the property 'dateProp'
*/
@Test
void datePropTest() {
// TODO: test dateProp
}
/**
* Test the property 'datetimeProp'
*/
@Test
void datetimePropTest() {
// TODO: test datetimeProp
}
/**
* Test the property 'arrayNullableProp'
*/
@Test
void arrayNullablePropTest() {
// TODO: test arrayNullableProp
}
/**
* Test the property 'arrayAndItemsNullableProp'
*/
@Test
void arrayAndItemsNullablePropTest() {
// TODO: test arrayAndItemsNullableProp
}
/**
* Test the property 'arrayItemsNullable'
*/
@Test
void arrayItemsNullableTest() {
// TODO: test arrayItemsNullable
}
/**
* Test the property 'objectNullableProp'
*/
@Test
void objectNullablePropTest() {
// TODO: test objectNullableProp
}
/**
* Test the property 'objectAndItemsNullableProp'
*/
@Test
void objectAndItemsNullablePropTest() {
// TODO: test objectAndItemsNullableProp
}
/**
* Test the property 'objectItemsNullable'
*/
@Test
void objectItemsNullableTest() {
// TODO: test objectItemsNullable
}
}

View File

@@ -0,0 +1,76 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
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.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.DeprecatedObject;
import org.junit.jupiter.api.Test;
/**
* Model tests for ObjectWithDeprecatedFields
*/
class ObjectWithDeprecatedFieldsTest {
private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields();
/**
* Model tests for ObjectWithDeprecatedFields
*/
@Test
void testObjectWithDeprecatedFields() {
// TODO: test ObjectWithDeprecatedFields
}
/**
* Test the property 'uuid'
*/
@Test
void uuidTest() {
// TODO: test uuid
}
/**
* Test the property 'id'
*/
@Test
void idTest() {
// TODO: test id
}
/**
* Test the property 'deprecatedRef'
*/
@Test
void deprecatedRefTest() {
// TODO: test deprecatedRef
}
/**
* Test the property 'bars'
*/
@Test
void barsTest() {
// TODO: test bars
}
}

View File

@@ -0,0 +1,31 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import org.junit.jupiter.api.Test;
/**
* Model tests for OuterEnumDefaultValue
*/
class OuterEnumDefaultValueTest {
/**
* Model tests for OuterEnumDefaultValue
*/
@Test
void testOuterEnumDefaultValue() {
// TODO: test OuterEnumDefaultValue
}
}

View File

@@ -0,0 +1,31 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import org.junit.jupiter.api.Test;
/**
* Model tests for OuterEnumIntegerDefaultValue
*/
class OuterEnumIntegerDefaultValueTest {
/**
* Model tests for OuterEnumIntegerDefaultValue
*/
@Test
void testOuterEnumIntegerDefaultValue() {
// TODO: test OuterEnumIntegerDefaultValue
}
}

View File

@@ -0,0 +1,31 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import org.junit.jupiter.api.Test;
/**
* Model tests for OuterEnumInteger
*/
class OuterEnumIntegerTest {
/**
* Model tests for OuterEnumInteger
*/
@Test
void testOuterEnumInteger() {
// TODO: test OuterEnumInteger
}
}

View File

@@ -0,0 +1,49 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
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.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.OuterEnumInteger;
import org.junit.jupiter.api.Test;
/**
* Model tests for OuterObjectWithEnumProperty
*/
class OuterObjectWithEnumPropertyTest {
private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty();
/**
* Model tests for OuterObjectWithEnumProperty
*/
@Test
void testOuterObjectWithEnumProperty() {
// TODO: test OuterObjectWithEnumProperty
}
/**
* Test the property 'value'
*/
@Test
void valueTest() {
// TODO: test value
}
}