diff --git a/bin/configs/java-microprofile-rest-client-3.0-jackson.yaml b/bin/configs/java-microprofile-rest-client-3.0-jackson.yaml index 7ffcc1cdcb85..2cf93a6d63a1 100644 --- a/bin/configs/java-microprofile-rest-client-3.0-jackson.yaml +++ b/bin/configs/java-microprofile-rest-client-3.0-jackson.yaml @@ -10,3 +10,4 @@ additionalProperties: microprofileRestClientVersion: "3.0" hideGenerationTimestamp: true useReflectionEqualsHashCode: true + openApiNullable: false diff --git a/bin/configs/java-microprofile-rest-client-3.0.yaml b/bin/configs/java-microprofile-rest-client-3.0.yaml index 0963a49c9d28..56689e70ba91 100644 --- a/bin/configs/java-microprofile-rest-client-3.0.yaml +++ b/bin/configs/java-microprofile-rest-client-3.0.yaml @@ -7,3 +7,4 @@ additionalProperties: artifactId: microprofile-rest-client-3 configKey: petstore microprofileRestClientVersion: "3.0" + openApiNullable: false diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ChildWithNullable.java index 38b3720a3b26..4c315942c2c1 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ChildWithNullable.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -25,7 +25,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.ParentWithNullable; -import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -74,22 +73,11 @@ public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, false, null, true); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/EnumTest.java index b371a373809d..c896035c6e69 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -25,10 +25,6 @@ import org.openapitools.client.model.OuterEnumDefaultValue; import org.openapitools.client.model.OuterEnumInteger; import org.openapitools.client.model.OuterEnumIntegerDefaultValue; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -403,22 +399,11 @@ public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, false, null, true); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 3185667c428b..faeae0f51c2d 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -21,10 +21,6 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -70,22 +66,11 @@ public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, false, null, true); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/NullableClass.java index 0483fe250ba1..059c3597bcb0 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/NullableClass.java @@ -28,10 +28,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -441,22 +437,11 @@ public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, false, null, true); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 574ba07f534d..657f266e6db5 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -24,10 +24,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -140,22 +136,11 @@ public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, false, null, true); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ChildWithNullable.java index 1536a7dcf959..078676fd7cd4 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ChildWithNullable.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -15,7 +15,6 @@ import java.util.Objects; import java.util.Arrays; import org.openapitools.client.model.ParentWithNullable; -import org.openapitools.jackson.nullable.JsonNullable; import java.lang.reflect.Type; import jakarta.json.bind.annotation.JsonbTypeDeserializer; import jakarta.json.bind.annotation.JsonbTypeSerializer; @@ -69,22 +68,11 @@ public boolean equals(Object o) { super.equals(o); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(otherProperty, super.hashCode()); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/EnumTest.java index 05ccde5fdc7e..c5922a925d9b 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/EnumTest.java @@ -18,7 +18,6 @@ import org.openapitools.client.model.OuterEnumDefaultValue; import org.openapitools.client.model.OuterEnumInteger; import org.openapitools.client.model.OuterEnumIntegerDefaultValue; -import org.openapitools.jackson.nullable.JsonNullable; import java.lang.reflect.Type; import jakarta.json.bind.annotation.JsonbTypeDeserializer; import jakarta.json.bind.annotation.JsonbTypeSerializer; @@ -407,22 +406,11 @@ public boolean equals(Object o) { Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum, outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/HealthCheckResult.java index dcf27d41154d..f565e8727dbb 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -14,7 +14,6 @@ import java.util.Objects; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import java.lang.reflect.Type; import jakarta.json.bind.annotation.JsonbTypeDeserializer; import jakarta.json.bind.annotation.JsonbTypeSerializer; @@ -70,22 +69,11 @@ public boolean equals(Object o) { return Objects.equals(this.nullableMessage, healthCheckResult.nullableMessage); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(nullableMessage); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/NullableClass.java index 87c7998164e2..93130350813f 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/NullableClass.java @@ -21,7 +21,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; import java.lang.reflect.Type; import jakarta.json.bind.annotation.JsonbTypeDeserializer; import jakarta.json.bind.annotation.JsonbTypeSerializer; @@ -387,22 +386,11 @@ public boolean equals(Object o) { super.equals(o); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(integerProp, numberProp, booleanProp, stringProp, dateProp, datetimeProp, arrayNullableProp, arrayAndItemsNullableProp, arrayItemsNullable, objectNullableProp, objectAndItemsNullableProp, objectItemsNullable, super.hashCode()); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ParentWithNullable.java index c71afa7b1702..7eace49a0c7b 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -14,7 +14,6 @@ import java.util.Objects; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import java.lang.reflect.Type; import jakarta.json.bind.annotation.JsonbTypeDeserializer; import jakarta.json.bind.annotation.JsonbTypeSerializer; @@ -135,22 +134,11 @@ public boolean equals(Object o) { Objects.equals(this.nullableProperty, parentWithNullable.nullableProperty); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(type, nullableProperty); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - /** * Create a string representation of this pojo. */