diff --git a/.github/workflows/samples-java-client-jdk11.yaml b/.github/workflows/samples-java-client-jdk11.yaml index cceef92d41d..59f52728d80 100644 --- a/.github/workflows/samples-java-client-jdk11.yaml +++ b/.github/workflows/samples-java-client-jdk11.yaml @@ -63,12 +63,15 @@ jobs: - samples/client/petstore/java/rest-assured - samples/client/petstore/java/rest-assured-jackson - samples/client/petstore/java/microprofile-rest-client + - samples/client/petstore/java/microprofile-rest-client-mutiny - samples/client/petstore/java/microprofile-rest-client-3.0 - samples/client/petstore/java/microprofile-rest-client-3.0-jackson - samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml + - samples/client/petstore/java/microprofile-rest-client-3.0-mutiny - samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter - samples/client/petstore/java/apache-httpclient - samples/client/petstore/java/feign + - samples/client/petstore/java/feign-no-nullable - samples/client/petstore/java/okhttp-gson-awsv4signature - samples/openapi3/client/petstore/java/jersey2-java8-special-characters - samples/openapi3/client/petstore/java/native diff --git a/bin/configs/java-feign-no-nullable.yaml b/bin/configs/java-feign-no-nullable.yaml index 05453b419dc..50aacc2ff08 100644 --- a/bin/configs/java-feign-no-nullable.yaml +++ b/bin/configs/java-feign-no-nullable.yaml @@ -6,6 +6,8 @@ templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: booleanGetterPrefix: is artifactId: petstore-feign-no-nullable - hideGenerationTimestamp: "true" + hideGenerationTimestamp: true additionalModelTypeAnnotations: '@javax.annotation.concurrent.Immutable' - openApiNullable: "false" + openApiNullable: false + useReflectionEqualsHashCode: true + annotationLibrary: "swagger1" diff --git a/bin/configs/java-jersey2-8.yaml b/bin/configs/java-jersey2-8.yaml index e4407a08260..259b88e07ce 100644 --- a/bin/configs/java-jersey2-8.yaml +++ b/bin/configs/java-jersey2-8.yaml @@ -11,4 +11,5 @@ additionalProperties: useOneOfDiscriminatorLookup: true disallowAdditionalPropertiesIfNotPresent: false gradleProperties: "\n# JVM arguments\norg.gradle.jvmargs=-Xmx2024m -XX:MaxPermSize=512m\n# set timeout\norg.gradle.daemon.idletimeout=3600000\n# show all warnings\norg.gradle.warning.mode=all" - failOnUnknownProperties: true \ No newline at end of file + failOnUnknownProperties: true + useReflectionEqualsHashCode: true diff --git a/bin/configs/java-jersey3.yaml b/bin/configs/java-jersey3.yaml index 3d958f01256..513f3889d3c 100644 --- a/bin/configs/java-jersey3.yaml +++ b/bin/configs/java-jersey3.yaml @@ -12,4 +12,5 @@ additionalProperties: useOneOfDiscriminatorLookup: true disallowAdditionalPropertiesIfNotPresent: false gradleProperties: "\n# JVM arguments\norg.gradle.jvmargs=-Xmx2024m -XX:MaxPermSize=512m\n# set timeout\norg.gradle.daemon.idletimeout=3600000\n# show all warnings\norg.gradle.warning.mode=all" - failOnUnknownProperties: true \ No newline at end of file + failOnUnknownProperties: true + useReflectionEqualsHashCode: true diff --git a/bin/configs/java-microprofile-rest-client-3.0-mutiny.yaml b/bin/configs/java-microprofile-rest-client-3.0-mutiny.yaml new file mode 100644 index 00000000000..aa2edc31450 --- /dev/null +++ b/bin/configs/java-microprofile-rest-client-3.0-mutiny.yaml @@ -0,0 +1,10 @@ +generatorName: java +outputDir: samples/client/petstore/java/microprofile-rest-client-3.0-mutiny +library: microprofile +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: microprofile-rest-client-3-mutiny + configKey: petstore + microprofileRestClientVersion: "3.0" + microprofileMutiny: true diff --git a/bin/configs/java-microprofile-rest-client-mutiny.yaml b/bin/configs/java-microprofile-rest-client-mutiny.yaml new file mode 100644 index 00000000000..d27aaf8cdfd --- /dev/null +++ b/bin/configs/java-microprofile-rest-client-mutiny.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/microprofile-rest-client-mutiny +library: microprofile +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: microprofile-rest-client-mutiny + configKeyFromClassName: true + microprofileMutiny: true diff --git a/bin/configs/java-native.yaml b/bin/configs/java-native.yaml index ba1795d9de3..467d6da6545 100644 --- a/bin/configs/java-native.yaml +++ b/bin/configs/java-native.yaml @@ -7,3 +7,4 @@ additionalProperties: artifactId: petstore-native hideGenerationTimestamp: "true" generateBuilders: true + useReflectionEqualsHashCode: "true" diff --git a/bin/configs/java-okhttp-gson.yaml b/bin/configs/java-okhttp-gson.yaml index 8b402a580a8..8f5c07cae49 100644 --- a/bin/configs/java-okhttp-gson.yaml +++ b/bin/configs/java-okhttp-gson.yaml @@ -11,9 +11,10 @@ parameterNameMappings: type_: typeWithUnderscore additionalProperties: artifactId: petstore-okhttp-gson - hideGenerationTimestamp: "true" - useOneOfDiscriminatorLookup: "true" + hideGenerationTimestamp: true + useOneOfDiscriminatorLookup: true disallowAdditionalPropertiesIfNotPresent: false + useReflectionEqualsHashCode:: true enumNameMappings: s: LOWER_CASE_S S: UPPER_CASE_S diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index 7409e650ff8..6557a7c70b3 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -126,6 +126,9 @@ ext { jersey_version = "1.19.4" jodatime_version = "2.9.9" junit_version = "5.10.2" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -148,6 +151,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "junit:junit:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index 4c485fede0c..2b4e0340e7f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -114,6 +114,9 @@ ext { feign_form_version = "3.8.0" junit_version = "5.7.0" scribejava_version = "8.0.0" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -127,9 +130,9 @@ dependencies { implementation "io.github.openfeign:feign-okhttp:$feign_version" implementation "io.github.openfeign.form:feign-form:$feign_form_version" {{#jackson}} - {{#joda}} + {{#joda}} implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" - {{/joda}} + {{/joda}} implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" @@ -142,6 +145,9 @@ dependencies { implementation "com.github.scribejava:scribejava-core:$scribejava_version" implementation "com.brsanthu:migbase64:2.2" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache index f42f909cc70..1a24b99f55d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache @@ -28,6 +28,9 @@ lazy val root = (project in file(".")). "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", +{{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", +{{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", "com.github.tomakehurst" % "wiremock-jre8" % "2.35.1" % "test", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache index 79712da6a4e..c915ea0ec9f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache @@ -345,6 +345,14 @@ provided {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -409,6 +417,9 @@ 1.3.5 2.0.2 {{/useJakartaEe}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.0 1.0.0 8.3.3 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index a9ab9623161..ca6ae2abe01 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -116,6 +116,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -146,6 +149,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache index d055cf378de..fa3ead60a2d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache @@ -33,6 +33,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache index ec3ad12d328..1373579cadc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -379,6 +379,15 @@ jersey-apache-connector ${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -414,6 +423,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.gradle.mustache index 42908c8bb47..f95eafca0c6 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.gradle.mustache @@ -116,6 +116,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -146,6 +149,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.sbt.mustache index 6e89375a6a1..5f07e56716e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.sbt.mustache @@ -33,6 +33,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "2.1.0" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pom.mustache index 49583229d48..a3c11504171 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pom.mustache @@ -379,6 +379,15 @@ jersey-apache-connector ${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -408,6 +417,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache index 32f50867982..59896d820f4 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache @@ -249,7 +249,7 @@ 2.6 1.9.1 {{#microprofileMutiny}} - 1.2.0 + 1.10.0 {{/microprofileMutiny}} {{#useReflectionEqualsHashCode}} 3.17.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache index 084bc6aee21..c09c296b42c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache @@ -189,6 +189,13 @@ ${jakarta.annotation.version} provided +{{#microprofileMutiny}} + + io.smallrye.reactive + mutiny + ${mutiny.version} + +{{/microprofileMutiny}} {{#useReflectionEqualsHashCode}} @@ -241,6 +248,9 @@ 1.1.0 2.6 1.9.1 +{{#microprofileMutiny}} + 1.10.0 +{{/microprofileMutiny}} {{#useReflectionEqualsHashCode}} 3.17.0 {{/useReflectionEqualsHashCode}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache index 34f24d89161..a04a9645e17 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache @@ -85,6 +85,9 @@ ext { {{#hasFormParamsInSpec}} httpmime_version = "4.5.13" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -107,6 +110,9 @@ dependencies { {{#hasFormParamsInSpec}} implementation "org.apache.httpcomponents:httpmime:$httpmime_version" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache index 62bb7917deb..0ccfa84182c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache @@ -271,6 +271,14 @@ ${httpmime-version} {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -304,6 +312,9 @@ {{#hasFormParamsInSpec}} 4.5.14 {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.2 2.27.2 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index eb67fc11240..1b527257ae0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -126,7 +126,7 @@ dependencies { {{#hasOAuthMethods}} implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' {{/hasOAuthMethods}} - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' {{#joda}} implementation 'joda-time:joda-time:2.9.9' {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache index 2045b84742e..54bd804c441 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", {{#openApiNullable}} "org.openapitools" % "jackson-databind-nullable" % "0.2.6", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index 465076a4d6e..5e7bd9b86ed 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -414,7 +414,7 @@ {{/swagger2AnnotationLibrary}} 4.12.0 2.10.1 - 3.14.0 + 3.17.0 {{#openApiNullable}} 0.2.6 {{/openApiNullable}} diff --git a/modules/openapi-generator/src/main/resources/Java/pom.mustache b/modules/openapi-generator/src/main/resources/Java/pom.mustache index b2bc5a25d8a..c46bc598e73 100644 --- a/modules/openapi-generator/src/main/resources/Java/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pom.mustache @@ -289,12 +289,12 @@ {{/useJakartaEe}} {{#withXml}} - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - ${jackson-version} - + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + {{/withXml}} {{#joda}} @@ -341,6 +341,15 @@ ${jakarta-annotation-version} provided + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -374,6 +383,9 @@ 1.3.5 2.0.2 {{/useJakartaEe}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 1.0.0 5.10.2 1.10.0 diff --git a/samples/client/echo_api/java/okhttp-gson-user-defined-templates/build.gradle b/samples/client/echo_api/java/okhttp-gson-user-defined-templates/build.gradle index 676e8c999a0..2d1609df2af 100644 --- a/samples/client/echo_api/java/okhttp-gson-user-defined-templates/build.gradle +++ b/samples/client/echo_api/java/okhttp-gson-user-defined-templates/build.gradle @@ -115,7 +115,7 @@ dependencies { implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/echo_api/java/okhttp-gson-user-defined-templates/build.sbt b/samples/client/echo_api/java/okhttp-gson-user-defined-templates/build.sbt index 41a2d93764c..e79c5140fca 100644 --- a/samples/client/echo_api/java/okhttp-gson-user-defined-templates/build.sbt +++ b/samples/client/echo_api/java/okhttp-gson-user-defined-templates/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", diff --git a/samples/client/echo_api/java/okhttp-gson-user-defined-templates/pom.xml b/samples/client/echo_api/java/okhttp-gson-user-defined-templates/pom.xml index 7a5b714d316..0e717a3ab12 100644 --- a/samples/client/echo_api/java/okhttp-gson-user-defined-templates/pom.xml +++ b/samples/client/echo_api/java/okhttp-gson-user-defined-templates/pom.xml @@ -331,7 +331,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/echo_api/java/okhttp-gson/build.gradle b/samples/client/echo_api/java/okhttp-gson/build.gradle index 1f433364a3a..ac77e86d715 100644 --- a/samples/client/echo_api/java/okhttp-gson/build.gradle +++ b/samples/client/echo_api/java/okhttp-gson/build.gradle @@ -114,7 +114,7 @@ dependencies { implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/echo_api/java/okhttp-gson/build.sbt b/samples/client/echo_api/java/okhttp-gson/build.sbt index 12ac2795172..ecb09dd27f5 100644 --- a/samples/client/echo_api/java/okhttp-gson/build.sbt +++ b/samples/client/echo_api/java/okhttp-gson/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", diff --git a/samples/client/echo_api/java/okhttp-gson/pom.xml b/samples/client/echo_api/java/okhttp-gson/pom.xml index 862d43891b8..806622488c7 100644 --- a/samples/client/echo_api/java/okhttp-gson/pom.xml +++ b/samples/client/echo_api/java/okhttp-gson/pom.xml @@ -326,7 +326,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/others/java/jersey2-oneOf-Mixed/pom.xml b/samples/client/others/java/jersey2-oneOf-Mixed/pom.xml index e2b1323c705..75c992cab76 100644 --- a/samples/client/others/java/jersey2-oneOf-Mixed/pom.xml +++ b/samples/client/others/java/jersey2-oneOf-Mixed/pom.xml @@ -318,6 +318,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter diff --git a/samples/client/others/java/jersey2-oneOf-duplicates/pom.xml b/samples/client/others/java/jersey2-oneOf-duplicates/pom.xml index e2b1323c705..75c992cab76 100644 --- a/samples/client/others/java/jersey2-oneOf-duplicates/pom.xml +++ b/samples/client/others/java/jersey2-oneOf-duplicates/pom.xml @@ -318,6 +318,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter diff --git a/samples/client/others/java/okhttp-gson-oneOf-array/build.gradle b/samples/client/others/java/okhttp-gson-oneOf-array/build.gradle index d1dc4ac2a57..d96f6d99d88 100644 --- a/samples/client/others/java/okhttp-gson-oneOf-array/build.gradle +++ b/samples/client/others/java/okhttp-gson-oneOf-array/build.gradle @@ -114,7 +114,7 @@ dependencies { implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/others/java/okhttp-gson-oneOf-array/build.sbt b/samples/client/others/java/okhttp-gson-oneOf-array/build.sbt index ecdac6b908f..8c3d65a33a6 100644 --- a/samples/client/others/java/okhttp-gson-oneOf-array/build.sbt +++ b/samples/client/others/java/okhttp-gson-oneOf-array/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", diff --git a/samples/client/others/java/okhttp-gson-oneOf-array/pom.xml b/samples/client/others/java/okhttp-gson-oneOf-array/pom.xml index 4796ef596cb..bd334327c87 100644 --- a/samples/client/others/java/okhttp-gson-oneOf-array/pom.xml +++ b/samples/client/others/java/okhttp-gson-oneOf-array/pom.xml @@ -333,7 +333,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/others/java/okhttp-gson-oneOf/build.gradle b/samples/client/others/java/okhttp-gson-oneOf/build.gradle index d1dc4ac2a57..d96f6d99d88 100644 --- a/samples/client/others/java/okhttp-gson-oneOf/build.gradle +++ b/samples/client/others/java/okhttp-gson-oneOf/build.gradle @@ -114,7 +114,7 @@ dependencies { implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/others/java/okhttp-gson-oneOf/build.sbt b/samples/client/others/java/okhttp-gson-oneOf/build.sbt index ecdac6b908f..8c3d65a33a6 100644 --- a/samples/client/others/java/okhttp-gson-oneOf/build.sbt +++ b/samples/client/others/java/okhttp-gson-oneOf/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", diff --git a/samples/client/others/java/okhttp-gson-oneOf/pom.xml b/samples/client/others/java/okhttp-gson-oneOf/pom.xml index 8d703337d94..667b3b718af 100644 --- a/samples/client/others/java/okhttp-gson-oneOf/pom.xml +++ b/samples/client/others/java/okhttp-gson-oneOf/pom.xml @@ -326,7 +326,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/others/java/okhttp-gson-streaming/build.gradle b/samples/client/others/java/okhttp-gson-streaming/build.gradle index b454a3a8132..41bc90123d8 100644 --- a/samples/client/others/java/okhttp-gson-streaming/build.gradle +++ b/samples/client/others/java/okhttp-gson-streaming/build.gradle @@ -114,7 +114,7 @@ dependencies { implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/others/java/okhttp-gson-streaming/build.sbt b/samples/client/others/java/okhttp-gson-streaming/build.sbt index b776f34e427..c074040f59f 100644 --- a/samples/client/others/java/okhttp-gson-streaming/build.sbt +++ b/samples/client/others/java/okhttp-gson-streaming/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", diff --git a/samples/client/others/java/okhttp-gson-streaming/pom.xml b/samples/client/others/java/okhttp-gson-streaming/pom.xml index 4b0f7510602..1db320466c1 100644 --- a/samples/client/others/java/okhttp-gson-streaming/pom.xml +++ b/samples/client/others/java/okhttp-gson-streaming/pom.xml @@ -326,7 +326,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/petstore/java/feign-no-nullable/build.gradle b/samples/client/petstore/java/feign-no-nullable/build.gradle index b71958edb54..7df6a10718d 100644 --- a/samples/client/petstore/java/feign-no-nullable/build.gradle +++ b/samples/client/petstore/java/feign-no-nullable/build.gradle @@ -109,6 +109,7 @@ ext { feign_form_version = "3.8.0" junit_version = "5.7.0" scribejava_version = "8.0.0" + commons_lang3_version = "3.17.0" } dependencies { @@ -127,6 +128,7 @@ dependencies { implementation "com.github.scribejava:scribejava-core:$scribejava_version" implementation "com.brsanthu:migbase64:2.2" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" diff --git a/samples/client/petstore/java/feign-no-nullable/build.sbt b/samples/client/petstore/java/feign-no-nullable/build.sbt index 6a1f2cb2fb3..1f85088e35a 100644 --- a/samples/client/petstore/java/feign-no-nullable/build.sbt +++ b/samples/client/petstore/java/feign-no-nullable/build.sbt @@ -24,6 +24,7 @@ lazy val root = (project in file(".")). "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", "com.github.tomakehurst" % "wiremock-jre8" % "2.35.1" % "test", diff --git a/samples/client/petstore/java/feign-no-nullable/pom.xml b/samples/client/petstore/java/feign-no-nullable/pom.xml index 1e12c67db06..dec835d94fc 100644 --- a/samples/client/petstore/java/feign-no-nullable/pom.xml +++ b/samples/client/petstore/java/feign-no-nullable/pom.xml @@ -206,6 +206,11 @@ + + io.swagger + swagger-annotations + ${swagger-annotations-version} + @@ -273,6 +278,12 @@ ${jakarta-annotation-version} provided + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + @@ -311,12 +322,14 @@ 1.8 ${java.version} ${java.version} + 1.6.11 13.2.1 3.8.0 2.17.1 2.17.1 1.3.5 2.0.2 + 3.17.0 5.10.0 1.0.0 8.3.3 diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d956eec0ce1..09baf1f4824 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -24,6 +26,8 @@ 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.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -57,6 +61,7 @@ public class AdditionalPropertiesAnyType extends HashMap { * @return name */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -117,20 +122,12 @@ public class AdditionalPropertiesAnyType extends HashMap { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index ea7b682f274..564290adaad 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -24,6 +26,8 @@ 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.util.HashMap; import java.util.List; import java.util.Map; @@ -58,6 +62,7 @@ public class AdditionalPropertiesArray extends HashMap { * @return name */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -118,20 +123,12 @@ public class AdditionalPropertiesArray extends HashMap { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 957e51a26c2..c734287b41f 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -24,6 +26,8 @@ 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.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -57,6 +61,7 @@ public class AdditionalPropertiesBoolean extends HashMap { * @return name */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -117,20 +122,12 @@ public class AdditionalPropertiesBoolean extends HashMap { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e5f2a700681..ea608f9e00f 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.HashMap; import java.util.List; @@ -112,6 +116,7 @@ public class AdditionalPropertiesClass { * @return mapString */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -146,6 +151,7 @@ public class AdditionalPropertiesClass { * @return mapNumber */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -180,6 +186,7 @@ public class AdditionalPropertiesClass { * @return mapInteger */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -214,6 +221,7 @@ public class AdditionalPropertiesClass { * @return mapBoolean */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -248,6 +256,7 @@ public class AdditionalPropertiesClass { * @return mapArrayInteger */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -282,6 +291,7 @@ public class AdditionalPropertiesClass { * @return mapArrayAnytype */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -316,6 +326,7 @@ public class AdditionalPropertiesClass { * @return mapMapString */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -350,6 +361,7 @@ public class AdditionalPropertiesClass { * @return mapMapAnytype */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -376,6 +388,7 @@ public class AdditionalPropertiesClass { * @return anytype1 */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ANYTYPE1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -402,6 +415,7 @@ public class AdditionalPropertiesClass { * @return anytype2 */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ANYTYPE2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -428,6 +442,7 @@ public class AdditionalPropertiesClass { * @return anytype3 */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ANYTYPE3) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -445,29 +460,12 @@ public class AdditionalPropertiesClass { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - 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 EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 1d3aa6aa79d..b197e40af41 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -24,6 +26,8 @@ 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.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -57,6 +61,7 @@ public class AdditionalPropertiesInteger extends HashMap { * @return name */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -117,20 +122,12 @@ public class AdditionalPropertiesInteger extends HashMap { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 08090c876ba..0f23d181b76 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -24,6 +26,8 @@ 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.HashMap; import java.util.Map; @@ -58,6 +62,7 @@ public class AdditionalPropertiesNumber extends HashMap { * @return name */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -118,20 +123,12 @@ public class AdditionalPropertiesNumber extends HashMap { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 889e43891ea..af3cd173a1b 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -24,6 +26,8 @@ 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.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -57,6 +61,7 @@ public class AdditionalPropertiesObject extends HashMap { * @return name */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -117,20 +122,12 @@ public class AdditionalPropertiesObject extends HashMap { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 8b779bcb0f2..e334f1c76bd 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -24,6 +26,8 @@ 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.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -57,6 +61,7 @@ public class AdditionalPropertiesString extends HashMap { * @return name */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -117,20 +122,12 @@ public class AdditionalPropertiesString extends HashMap { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java index f62cf986f2c..1ac7f4fddcc 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -23,6 +25,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -69,6 +73,7 @@ public class Animal { * @return className */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_CLASS_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -95,6 +100,7 @@ public class Animal { * @return color */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -112,20 +118,12 @@ public class Animal { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className, color); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 3268072dde7..f37576f7f39 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.Arrays; @@ -62,6 +66,7 @@ public class ArrayOfArrayOfNumberOnly { * @return arrayArrayNumber */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -79,19 +84,12 @@ public class ArrayOfArrayOfNumberOnly { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayArrayNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 9a2cc4f2cd5..654d79edb30 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.Arrays; @@ -62,6 +66,7 @@ public class ArrayOfNumberOnly { * @return arrayNumber */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -79,19 +84,12 @@ public class ArrayOfNumberOnly { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java index b513a4b9ebb..8095b9f458c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -72,6 +76,7 @@ public class ArrayTest { * @return arrayOfString */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -106,6 +111,7 @@ public class ArrayTest { * @return arrayArrayOfInteger */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -140,6 +146,7 @@ public class ArrayTest { * @return arrayArrayOfModel */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -157,21 +164,12 @@ public class ArrayTest { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java index bcf069d332c..9eec4cbd208 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -23,6 +25,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; 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.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -100,6 +104,7 @@ public class BigCat extends Cat { * @return kind */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_KIND) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -117,20 +122,12 @@ public class BigCat extends Cat { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCat bigCat = (BigCat) o; - return Objects.equals(this.kind, bigCat.kind) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(kind, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java index 676c763a532..4469eace547 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -75,6 +79,7 @@ public class Capitalization { * @return smallCamel */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -101,6 +106,7 @@ public class Capitalization { * @return capitalCamel */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -127,6 +133,7 @@ public class Capitalization { * @return smallSnake */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -153,6 +160,7 @@ public class Capitalization { * @return capitalSnake */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -179,6 +187,7 @@ public class Capitalization { * @return scAETHFlowPoints */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -205,6 +214,7 @@ public class Capitalization { * @return ATT_NAME */ @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the pet ") @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -222,24 +232,12 @@ public class Capitalization { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java index 99c1c1f1985..37477240fbc 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -23,6 +25,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; 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.Animal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -64,6 +68,7 @@ public class Cat extends Animal { * @return declawed */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DECLAWED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -81,20 +86,12 @@ public class Cat extends Animal { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(declawed, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Category.java index 01b110dc4a2..305217ea67b 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Category.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -55,6 +59,7 @@ public class Category { * @return id */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -81,6 +86,7 @@ public class Category { * @return name */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -98,20 +104,12 @@ public class Category { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java index 731e8329afb..29d3c34fe3c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,12 +22,15 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property */ +@ApiModel(description = "Model for testing model with \"_class\" property") @JsonPropertyOrder({ ClassModel.JSON_PROPERTY_PROPERTY_CLASS }) @@ -50,6 +55,7 @@ public class ClassModel { * @return propertyClass */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -67,19 +73,12 @@ public class ClassModel { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(propertyClass); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Client.java index 18ecea78369..94612ff45e2 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Client.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -50,6 +54,7 @@ public class Client { * @return client */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CLIENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -67,19 +72,12 @@ public class Client { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(client); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java index 2abd2a24270..9bb3bb1fe8e 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -23,6 +25,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; 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.Animal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -61,6 +65,7 @@ public class Dog extends Animal { * @return breed */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BREED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -78,20 +83,12 @@ public class Dog extends Animal { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(breed, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java index 4a6b68fce64..de78a026df5 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -128,6 +132,7 @@ public class EnumArrays { * @return justSymbol */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -162,6 +167,7 @@ public class EnumArrays { * @return arrayEnum */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -179,20 +185,12 @@ public class EnumArrays { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java index 1190cf5abe3..111927ab55f 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java index d4557345000..fbfd4080718 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -216,6 +220,7 @@ public class EnumTest { * @return enumString */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ENUM_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -242,6 +247,7 @@ public class EnumTest { * @return enumStringRequired */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -268,6 +274,7 @@ public class EnumTest { * @return enumInteger */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -294,6 +301,7 @@ public class EnumTest { * @return enumNumber */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -320,6 +328,7 @@ public class EnumTest { * @return outerEnum */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -337,23 +346,12 @@ public class EnumTest { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/File.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/File.java index e96a02bcd02..55a44a1bee1 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/File.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/File.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,12 +22,15 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; /** * Must be named `File` for test. */ +@ApiModel(description = "Must be named `File` for test.") @JsonPropertyOrder({ File.JSON_PROPERTY_SOURCE_U_R_I }) @@ -50,6 +55,7 @@ public class File { * @return sourceURI */ @javax.annotation.Nullable + @ApiModelProperty(value = "Test capitalization") @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -67,19 +73,12 @@ public class File { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - File file = (File) o; - return Objects.equals(this.sourceURI, file.sourceURI); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(sourceURI); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 250122ef180..180070914cd 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.io.File; import java.util.ArrayList; import java.util.Arrays; @@ -59,6 +63,7 @@ public class FileSchemaTestClass { * @return file */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -93,6 +98,7 @@ public class FileSchemaTestClass { * @return files */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -110,20 +116,12 @@ public class FileSchemaTestClass { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this.file, fileSchemaTestClass.file) && - Objects.equals(this.files, fileSchemaTestClass.files); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(file, files); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java index 93940d641d0..7a1e88fcfbd 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.io.File; import java.math.BigDecimal; import java.time.LocalDate; @@ -123,6 +127,7 @@ public class FormatTest { * @return integer */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -151,6 +156,7 @@ public class FormatTest { * @return int32 */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INT32) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -177,6 +183,7 @@ public class FormatTest { * @return int64 */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INT64) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -205,6 +212,7 @@ public class FormatTest { * @return number */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -233,6 +241,7 @@ public class FormatTest { * @return _float */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FLOAT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -261,6 +270,7 @@ public class FormatTest { * @return _double */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DOUBLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -287,6 +297,7 @@ public class FormatTest { * @return string */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -313,6 +324,7 @@ public class FormatTest { * @return _byte */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_BYTE) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -339,6 +351,7 @@ public class FormatTest { * @return binary */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BINARY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -365,6 +378,7 @@ public class FormatTest { * @return date */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -391,6 +405,7 @@ public class FormatTest { * @return dateTime */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -417,6 +432,7 @@ public class FormatTest { * @return uuid */ @javax.annotation.Nullable + @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty(JSON_PROPERTY_UUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -443,6 +459,7 @@ public class FormatTest { * @return password */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -469,6 +486,7 @@ public class FormatTest { * @return bigDecimal */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -486,32 +504,12 @@ public class FormatTest { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 9dc90d1f3ce..3c8e0591f6d 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -60,6 +64,7 @@ public class HasOnlyReadOnly { * @return bar */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -75,6 +80,7 @@ public class HasOnlyReadOnly { * @return foo */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FOO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -87,20 +93,12 @@ public class HasOnlyReadOnly { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar, foo); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java index 81c20684340..d562576eb5b 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -110,6 +114,7 @@ public class MapTest { * @return mapMapOfString */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -144,6 +149,7 @@ public class MapTest { * @return mapOfEnumString */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -178,6 +184,7 @@ public class MapTest { * @return directMap */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -212,6 +219,7 @@ public class MapTest { * @return indirectMap */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -229,22 +237,12 @@ public class MapTest { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 85e8725ad6f..9c15ac145d6 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; @@ -65,6 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * @return uuid */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_UUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -91,6 +96,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * @return dateTime */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -125,6 +131,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * @return map */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -142,21 +149,12 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(uuid, dateTime, map); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java index 05d89779ec1..6d244a20650 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,12 +22,15 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number */ +@ApiModel(description = "Model for testing model name starting with number") @JsonPropertyOrder({ Model200Response.JSON_PROPERTY_NAME, Model200Response.JSON_PROPERTY_PROPERTY_CLASS @@ -56,6 +61,7 @@ public class Model200Response { * @return name */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -82,6 +88,7 @@ public class Model200Response { * @return propertyClass */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -99,20 +106,12 @@ public class Model200Response { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, propertyClass); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 831e6c8580a..0052dc96f97 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -61,6 +65,7 @@ public class ModelApiResponse { * @return code */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -87,6 +92,7 @@ public class ModelApiResponse { * @return type */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -113,6 +119,7 @@ public class ModelApiResponse { * @return message */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -130,21 +137,12 @@ public class ModelApiResponse { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(code, type, message); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelList.java index 712b3cf6b47..968cc05d459 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelList.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -51,6 +55,7 @@ public class ModelList { * @return _123list */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_123LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -68,19 +73,12 @@ public class ModelList { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_123list); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java index c2c62f72330..e0f52102ba3 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,12 +22,15 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words */ +@ApiModel(description = "Model for testing reserved words") @JsonPropertyOrder({ ModelReturn.JSON_PROPERTY_RETURN }) @@ -51,6 +56,7 @@ public class ModelReturn { * @return _return */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_RETURN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -68,19 +74,12 @@ public class ModelReturn { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_return); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Name.java index bbe70280cae..1119481e9fe 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Name.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,12 +22,15 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name */ +@ApiModel(description = "Model for testing model name same as property name") @JsonPropertyOrder({ Name.JSON_PROPERTY_NAME, Name.JSON_PROPERTY_SNAKE_CASE, @@ -75,6 +80,7 @@ public class Name { * @return name */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -95,6 +101,7 @@ public class Name { * @return snakeCase */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SNAKE_CASE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -116,6 +123,7 @@ public class Name { * @return property */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -136,6 +144,7 @@ public class Name { * @return _123number */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_123NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -148,22 +157,12 @@ public class Name { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java index 1d49eb406fe..2bb6f0cac01 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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 com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -51,6 +55,7 @@ public class NumberOnly { * @return justNumber */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_JUST_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -68,19 +73,12 @@ public class NumberOnly { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(justNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Order.java index dc6d52dc209..677cb671afa 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Order.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.time.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -113,6 +117,7 @@ public class Order { * @return id */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -139,6 +144,7 @@ public class Order { * @return petId */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PET_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -165,6 +171,7 @@ public class Order { * @return quantity */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -191,6 +198,7 @@ public class Order { * @return shipDate */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -217,6 +225,7 @@ public class Order { * @return status */ @javax.annotation.Nullable + @ApiModelProperty(value = "Order Status") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -243,6 +252,7 @@ public class Order { * @return complete */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -260,24 +270,12 @@ public class Order { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java index e919c4e6d9e..583303bd274 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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 com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -61,6 +65,7 @@ public class OuterComposite { * @return myNumber */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -87,6 +92,7 @@ public class OuterComposite { * @return myString */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -113,6 +119,7 @@ public class OuterComposite { * @return myBoolean */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -130,21 +137,12 @@ public class OuterComposite { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java index d2924eb9c29..925066b5070 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Pet.java index 3fd31774a9d..6bf46e65af0 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Pet.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -21,6 +23,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedHashSet; @@ -120,6 +124,7 @@ public class Pet { * @return id */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -146,6 +151,7 @@ public class Pet { * @return category */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -172,6 +178,7 @@ public class Pet { * @return name */ @javax.annotation.Nonnull + @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -206,6 +213,7 @@ public class Pet { * @return photoUrls */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -241,6 +249,7 @@ public class Pet { * @return tags */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -267,6 +276,7 @@ public class Pet { * @return status */ @javax.annotation.Nullable + @ApiModelProperty(value = "pet status in the store") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -284,24 +294,12 @@ public class Pet { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Pet pet = (Pet) o; - return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && - Objects.equals(this.name, pet.name) && - Objects.equals(this.photoUrls, pet.photoUrls) && - Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index e59d2651536..ae6b49f942c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -57,6 +61,7 @@ public class ReadOnlyFirst { * @return bar */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -78,6 +83,7 @@ public class ReadOnlyFirst { * @return baz */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAZ) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -95,20 +101,12 @@ public class ReadOnlyFirst { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar, baz); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java index 30f18df8bd5..5c45b2b8690 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -51,6 +55,7 @@ public class SpecialModelName { * @return $specialPropertyName */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -68,19 +73,12 @@ public class SpecialModelName { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash($specialPropertyName); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Tag.java index bdb029f7319..5eaa904b3d6 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Tag.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -55,6 +59,7 @@ public class Tag { * @return id */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -81,6 +86,7 @@ public class Tag { * @return name */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -98,20 +104,12 @@ public class Tag { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index f6c5a693e8a..bc17a17906f 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.Arrays; @@ -74,6 +78,7 @@ public class TypeHolderDefault { * @return stringItem */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_STRING_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -100,6 +105,7 @@ public class TypeHolderDefault { * @return numberItem */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -126,6 +132,7 @@ public class TypeHolderDefault { * @return integerItem */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -152,6 +159,7 @@ public class TypeHolderDefault { * @return boolItem */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_BOOL_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -186,6 +194,7 @@ public class TypeHolderDefault { * @return arrayItem */ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -203,23 +212,12 @@ public class TypeHolderDefault { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; - return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && - Objects.equals(this.numberItem, typeHolderDefault.numberItem) && - Objects.equals(this.integerItem, typeHolderDefault.integerItem) && - Objects.equals(this.boolItem, typeHolderDefault.boolItem) && - Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 90c368d7a77..ca05c662f07 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.Arrays; @@ -79,6 +83,7 @@ public class TypeHolderExample { * @return stringItem */ @javax.annotation.Nonnull + @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty(JSON_PROPERTY_STRING_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -105,6 +110,7 @@ public class TypeHolderExample { * @return numberItem */ @javax.annotation.Nonnull + @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -131,6 +137,7 @@ public class TypeHolderExample { * @return floatItem */ @javax.annotation.Nonnull + @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -157,6 +164,7 @@ public class TypeHolderExample { * @return integerItem */ @javax.annotation.Nonnull + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -183,6 +191,7 @@ public class TypeHolderExample { * @return boolItem */ @javax.annotation.Nonnull + @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty(JSON_PROPERTY_BOOL_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -217,6 +226,7 @@ public class TypeHolderExample { * @return arrayItem */ @javax.annotation.Nonnull + @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -234,24 +244,12 @@ public class TypeHolderExample { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderExample typeHolderExample = (TypeHolderExample) o; - return Objects.equals(this.stringItem, typeHolderExample.stringItem) && - Objects.equals(this.numberItem, typeHolderExample.numberItem) && - Objects.equals(this.floatItem, typeHolderExample.floatItem) && - Objects.equals(this.integerItem, typeHolderExample.integerItem) && - Objects.equals(this.boolItem, typeHolderExample.boolItem) && - Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/User.java index 453196da014..6bff7c18d9b 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/User.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -85,6 +89,7 @@ public class User { * @return id */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -111,6 +116,7 @@ public class User { * @return username */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_USERNAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -137,6 +143,7 @@ public class User { * @return firstName */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -163,6 +170,7 @@ public class User { * @return lastName */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -189,6 +197,7 @@ public class User { * @return email */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_EMAIL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -215,6 +224,7 @@ public class User { * @return password */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -241,6 +251,7 @@ public class User { * @return phone */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -267,6 +278,7 @@ public class User { * @return userStatus */ @javax.annotation.Nullable + @ApiModelProperty(value = "User Status") @JsonProperty(JSON_PROPERTY_USER_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -284,26 +296,12 @@ public class User { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.id, user.id) && - Objects.equals(this.username, user.username) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.email, user.email) && - Objects.equals(this.password, user.password) && - Objects.equals(this.phone, user.phone) && - Objects.equals(this.userStatus, user.userStatus); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java index bc3a8faa2f0..a6e2c952994 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; @@ -20,6 +22,8 @@ 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.Arrays; @@ -194,6 +198,7 @@ public class XmlItem { * @return attributeString */ @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -220,6 +225,7 @@ public class XmlItem { * @return attributeNumber */ @javax.annotation.Nullable + @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -246,6 +252,7 @@ public class XmlItem { * @return attributeInteger */ @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -272,6 +279,7 @@ public class XmlItem { * @return attributeBoolean */ @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -306,6 +314,7 @@ public class XmlItem { * @return wrappedArray */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -332,6 +341,7 @@ public class XmlItem { * @return nameString */ @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_NAME_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -358,6 +368,7 @@ public class XmlItem { * @return nameNumber */ @javax.annotation.Nullable + @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_NAME_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -384,6 +395,7 @@ public class XmlItem { * @return nameInteger */ @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_NAME_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -410,6 +422,7 @@ public class XmlItem { * @return nameBoolean */ @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -444,6 +457,7 @@ public class XmlItem { * @return nameArray */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -478,6 +492,7 @@ public class XmlItem { * @return nameWrappedArray */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -504,6 +519,7 @@ public class XmlItem { * @return prefixString */ @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -530,6 +546,7 @@ public class XmlItem { * @return prefixNumber */ @javax.annotation.Nullable + @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -556,6 +573,7 @@ public class XmlItem { * @return prefixInteger */ @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -582,6 +600,7 @@ public class XmlItem { * @return prefixBoolean */ @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -616,6 +635,7 @@ public class XmlItem { * @return prefixArray */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -650,6 +670,7 @@ public class XmlItem { * @return prefixWrappedArray */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -676,6 +697,7 @@ public class XmlItem { * @return namespaceString */ @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -702,6 +724,7 @@ public class XmlItem { * @return namespaceNumber */ @javax.annotation.Nullable + @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -728,6 +751,7 @@ public class XmlItem { * @return namespaceInteger */ @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -754,6 +778,7 @@ public class XmlItem { * @return namespaceBoolean */ @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -788,6 +813,7 @@ public class XmlItem { * @return namespaceArray */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -822,6 +848,7 @@ public class XmlItem { * @return namespaceWrappedArray */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -848,6 +875,7 @@ public class XmlItem { * @return prefixNsString */ @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -874,6 +902,7 @@ public class XmlItem { * @return prefixNsNumber */ @javax.annotation.Nullable + @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -900,6 +929,7 @@ public class XmlItem { * @return prefixNsInteger */ @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -926,6 +956,7 @@ public class XmlItem { * @return prefixNsBoolean */ @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -960,6 +991,7 @@ public class XmlItem { * @return prefixNsArray */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -994,6 +1026,7 @@ public class XmlItem { * @return prefixNsWrappedArray */ @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -1011,47 +1044,12 @@ public class XmlItem { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml b/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml index e8b2b428593..4b517189c01 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml @@ -323,6 +323,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml index ada0fee29cd..1d56717fbc2 100644 --- a/samples/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/client/petstore/java/jersey2-java8/pom.xml @@ -323,6 +323,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter diff --git a/samples/client/petstore/java/jersey3-oneOf/pom.xml b/samples/client/petstore/java/jersey3-oneOf/pom.xml index 616be794b60..590d772f329 100644 --- a/samples/client/petstore/java/jersey3-oneOf/pom.xml +++ b/samples/client/petstore/java/jersey3-oneOf/pom.xml @@ -318,6 +318,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter diff --git a/samples/client/petstore/java/jersey3/build.gradle b/samples/client/petstore/java/jersey3/build.gradle index 66e463de413..10c96f84970 100644 --- a/samples/client/petstore/java/jersey3/build.gradle +++ b/samples/client/petstore/java/jersey3/build.gradle @@ -108,6 +108,7 @@ ext { junit_version = "5.8.2" scribejava_apis_version = "8.3.1" tomitribe_http_signatures_version = "1.7" + commons_lang3_version = "3.17.0" } dependencies { @@ -127,6 +128,7 @@ dependencies { implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/samples/client/petstore/java/jersey3/build.sbt b/samples/client/petstore/java/jersey3/build.sbt index f57389cc41f..693ad5c7208 100644 --- a/samples/client/petstore/java/jersey3/build.sbt +++ b/samples/client/petstore/java/jersey3/build.sbt @@ -24,6 +24,7 @@ lazy val root = (project in file(".")). "com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile", "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "2.1.0" % "compile", + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/samples/client/petstore/java/jersey3/pom.xml b/samples/client/petstore/java/jersey3/pom.xml index 11aaeb47b7f..69c559dbede 100644 --- a/samples/client/petstore/java/jersey3/pom.xml +++ b/samples/client/petstore/java/jersey3/pom.xml @@ -335,6 +335,13 @@ jersey-apache-connector ${jersey-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + org.junit.jupiter @@ -354,6 +361,7 @@ 5.10.0 1.8 8.3.3 + 3.17.0 2.21.0 diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 795337f2d52..38600bbe6fc 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -337,21 +339,7 @@ public class AdditionalPropertiesClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && - Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty) && - equalsNullable(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.mapWithUndeclaredPropertiesAnytype1, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype1) && - Objects.equals(this.mapWithUndeclaredPropertiesAnytype2, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype2) && - Objects.equals(this.mapWithUndeclaredPropertiesAnytype3, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype3) && - Objects.equals(this.emptyMap, additionalPropertiesClass.emptyMap) && - Objects.equals(this.mapWithUndeclaredPropertiesString, additionalPropertiesClass.mapWithUndeclaredPropertiesString); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -360,7 +348,7 @@ public class AdditionalPropertiesClass { @Override public int hashCode() { - return Objects.hash(mapProperty, mapOfMapProperty, hashCodeNullable(anytype1), mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, emptyMap, mapWithUndeclaredPropertiesString); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Animal.java index 118df795806..e5f42f8b418 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Animal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -119,20 +121,12 @@ public class Animal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className, color); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Apple.java index 24e7849e22b..0d82658dac6 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Apple.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -106,20 +108,12 @@ public class Apple { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Apple apple = (Apple) o; - return Objects.equals(this.cultivar, apple.cultivar) && - Objects.equals(this.origin, apple.origin); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(cultivar, origin); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AppleReq.java index 73918b98ff7..7ae4e6cbe17 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AppleReq.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AppleReq.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -107,20 +109,12 @@ public class AppleReq { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AppleReq appleReq = (AppleReq) o; - return Objects.equals(this.cultivar, appleReq.cultivar) && - Objects.equals(this.mealy, appleReq.mealy); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(cultivar, mealy); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 7f4d13dbf20..579df04b517 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -86,19 +88,12 @@ public class ArrayOfArrayOfNumberOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayArrayNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index da38b552514..35857824d67 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -86,19 +88,12 @@ public class ArrayOfNumberOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayTest.java index 81b5130763e..27cfadfc1e1 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -165,21 +167,12 @@ public class ArrayTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Banana.java index 9a7d1063835..aa8ef955f9d 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Banana.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -77,19 +79,12 @@ public class Banana { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Banana banana = (Banana) o; - return Objects.equals(this.lengthCm, banana.lengthCm); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(lengthCm); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BananaReq.java index d2c71a7b906..aa1f2189047 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BananaReq.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BananaReq.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -109,20 +111,12 @@ public class BananaReq { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BananaReq bananaReq = (BananaReq) o; - return Objects.equals(this.lengthCm, bananaReq.lengthCm) && - Objects.equals(this.sweet, bananaReq.sweet); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(lengthCm, sweet); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BasquePig.java index a78866da42e..765d3d381e5 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BasquePig.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -75,19 +77,12 @@ public class BasquePig { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BasquePig basquePig = (BasquePig) o; - return Objects.equals(this.className, basquePig.className); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Capitalization.java index 940ac1bcbf4..fc5c8aaa3a5 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Capitalization.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -229,24 +231,12 @@ public class Capitalization { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Cat.java index 808ea9cad3d..78a2f409a6a 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Cat.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -126,21 +128,12 @@ public class Cat extends Animal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed)&& - Objects.equals(this.additionalProperties, cat.additionalProperties) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(declawed, super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Category.java index 025a95801ba..956a76375a9 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Category.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -106,20 +108,12 @@ public class Category { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java index 5f8808c00ad..7d2d619c80c 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -170,22 +172,12 @@ public class ChildCat extends ParentPet { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildCat childCat = (ChildCat) o; - return Objects.equals(this.name, childCat.name) && - Objects.equals(this.petType, childCat.petType)&& - Objects.equals(this.additionalProperties, childCat.additionalProperties) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, petType, super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ClassModel.java index 01fe1710971..c2a24b777d4 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ClassModel.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -74,19 +76,12 @@ public class ClassModel { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(propertyClass); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Client.java index ab42ff0259e..09047f60c11 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Client.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -74,19 +76,12 @@ public class Client { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(client); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index fee47826346..c6e264cb6f8 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -148,21 +150,12 @@ public class ComplexQuadrilateral { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ComplexQuadrilateral complexQuadrilateral = (ComplexQuadrilateral) o; - return Objects.equals(this.shapeType, complexQuadrilateral.shapeType) && - Objects.equals(this.quadrilateralType, complexQuadrilateral.quadrilateralType)&& - Objects.equals(this.additionalProperties, complexQuadrilateral.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, quadrilateralType, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DanishPig.java index dcd9fe27ff7..dd84e7d41ad 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DanishPig.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -75,19 +77,12 @@ public class DanishPig { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DanishPig danishPig = (DanishPig) o; - return Objects.equals(this.className, danishPig.className); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DeprecatedObject.java index acc3dc73e10..aad4cd27764 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -76,19 +78,12 @@ public class DeprecatedObject { */ @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); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Dog.java index 880c6b5a1a6..fa0325732bd 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Dog.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -125,21 +127,12 @@ public class Dog extends Animal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed)&& - Objects.equals(this.additionalProperties, dog.additionalProperties) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(breed, super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Drawing.java index b3b4a6666b0..06975f27e72 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Drawing.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -244,18 +246,7 @@ public class Drawing { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Drawing drawing = (Drawing) o; - return Objects.equals(this.mainShape, drawing.mainShape) && - equalsNullable(this.shapeOrNull, drawing.shapeOrNull) && - equalsNullable(this.nullableShape, drawing.nullableShape) && - Objects.equals(this.shapes, drawing.shapes)&& - Objects.equals(this.additionalProperties, drawing.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -264,7 +255,7 @@ public class Drawing { @Override public int hashCode() { - return Objects.hash(mainShape, hashCodeNullable(shapeOrNull), hashCodeNullable(nullableShape), shapes, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumArrays.java index c171e5308d6..52eb75c7a2c 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -185,20 +187,12 @@ public class EnumArrays { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumClass.java index 8896a4043cb..a8d97ff8d03 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java index 156ca8f8972..4a78c7cdf54 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -522,22 +524,7 @@ public class EnumTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumIntegerOnly, enumTest.enumIntegerOnly) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - equalsNullable(this.outerEnum, enumTest.outerEnum) && - Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && - Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && - Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -546,7 +533,7 @@ public class EnumTest { @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumIntegerOnly, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 44732e01391..89b557c00d4 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -148,21 +150,12 @@ public class EquilateralTriangle { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EquilateralTriangle equilateralTriangle = (EquilateralTriangle) o; - return Objects.equals(this.shapeType, equilateralTriangle.shapeType) && - Objects.equals(this.triangleType, equilateralTriangle.triangleType)&& - Objects.equals(this.additionalProperties, equilateralTriangle.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index ba770c57dd9..b35606dfb0c 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -118,20 +120,12 @@ public class FileSchemaTestClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this._file, fileSchemaTestClass._file) && - Objects.equals(this.files, fileSchemaTestClass.files); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_file, files); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Foo.java index 62210e1b6ce..d0f4a278200 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Foo.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -74,19 +76,12 @@ public class Foo { */ @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); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index c18b124e09a..ff6ef3437c2 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -77,19 +79,12 @@ public class FooGetDefaultResponse { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; - return Objects.equals(this.string, fooGetDefaultResponse.string); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(string); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FormatTest.java index a82a6a123b7..23bae6a2b07 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FormatTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -565,34 +567,12 @@ public class FormatTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - 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) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && - Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Fruit.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Fruit.java index c819d5a9365..fed2a9288fa 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Fruit.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Fruit.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FruitReq.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FruitReq.java index 17c9e85e05c..c84f7a73439 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FruitReq.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FruitReq.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GmFruit.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GmFruit.java index 36ffb634603..5f1d0c0244a 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GmFruit.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GmFruit.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index fbbe6f2788a..56c27efa3ee 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -88,19 +90,12 @@ public class GrandparentAnimal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GrandparentAnimal grandparentAnimal = (GrandparentAnimal) o; - return Objects.equals(this.petType, grandparentAnimal.petType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(petType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 2b6cd744bd2..7a4669ecd5a 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -96,20 +98,12 @@ public class HasOnlyReadOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar, foo); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HealthCheckResult.java index cb1d09c13c5..e4b40a5da07 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -85,14 +87,7 @@ public class HealthCheckResult { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HealthCheckResult healthCheckResult = (HealthCheckResult) o; - return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -101,7 +96,7 @@ public class HealthCheckResult { @Override public int hashCode() { - return Objects.hash(hashCodeNullable(nullableMessage)); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java index d116617abdd..3274a6c2de5 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -107,20 +109,12 @@ public class IsoscelesTriangle { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IsoscelesTriangle isoscelesTriangle = (IsoscelesTriangle) o; - return Objects.equals(this.shapeType, isoscelesTriangle.shapeType) && - Objects.equals(this.triangleType, isoscelesTriangle.triangleType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Mammal.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Mammal.java index 6b46ceee645..dff17656315 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Mammal.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Mammal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MammalAnyof.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MammalAnyof.java index 90e11adaa73..21af2f6a0ff 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MammalAnyof.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MammalAnyof.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MapTest.java index 03f3eda9cc3..6e4215d1e93 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MapTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -237,22 +239,12 @@ public class MapTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index eb9a5aef500..a0849457b7d 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -152,21 +154,12 @@ public class MixedPropertiesAndAdditionalPropertiesClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(uuid, dateTime, map); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Model200Response.java index aabc6c471b2..9d7b704fcd5 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Model200Response.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -106,20 +108,12 @@ public class Model200Response { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, propertyClass); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 33bdc417985..2ed3b0d59f7 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -137,21 +139,12 @@ public class ModelApiResponse { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(code, type, message); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelFile.java index 98a0e80e521..ea54901098c 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelFile.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -75,19 +77,12 @@ public class ModelFile { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(sourceURI); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelList.java index 0434c06ae29..fb84e33166e 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelList.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -75,19 +77,12 @@ public class ModelList { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_123list); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelReturn.java index 840f3dae748..bc026726495 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -75,19 +77,12 @@ public class ModelReturn { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_return); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Name.java index 2bd14b77f3a..bf7c1a23f05 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Name.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -158,22 +160,12 @@ public class Name { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableClass.java index 883f1cbba65..ec8d3c13a93 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -604,26 +606,7 @@ public class NullableClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NullableClass nullableClass = (NullableClass) o; - return equalsNullable(this.integerProp, nullableClass.integerProp) && - equalsNullable(this.numberProp, nullableClass.numberProp) && - equalsNullable(this.booleanProp, nullableClass.booleanProp) && - equalsNullable(this.stringProp, nullableClass.stringProp) && - equalsNullable(this.dateProp, nullableClass.dateProp) && - equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && - equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && - equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && - Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && - equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && - equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && - Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable)&& - Objects.equals(this.additionalProperties, nullableClass.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -632,7 +615,7 @@ public class NullableClass { @Override public int hashCode() { - return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableShape.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableShape.java index 429b0dde63e..b1def258839 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableShape.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableShape.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NumberOnly.java index 2ce68e24084..be29d3d8a13 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -76,19 +78,12 @@ public class NumberOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(justNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index a79d8c67c62..af61194f816 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -196,22 +198,12 @@ public class ObjectWithDeprecatedFields { */ @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); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(uuid, id, deprecatedRef, bars); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Order.java index 1205e73cfcf..7990be6a7ce 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Order.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -268,24 +270,12 @@ public class Order { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterComposite.java index 286cf92b75b..a356b02afb9 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -138,21 +140,12 @@ public class OuterComposite { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnum.java index d1406d0afca..ff6b4dff8e9 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java index e20841e97c8..55e81d23005 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumInteger.java index f7c3095b681..55c38bd319f 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumInteger.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java index 71b91d2f62b..b6156de0ce6 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ParentPet.java index 68ee6a8725e..363d6876db9 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ParentPet.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -97,18 +99,12 @@ public class ParentPet extends GrandparentAnimal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pet.java index 0db1e478552..229b5c7cd9e 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pet.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -290,24 +292,12 @@ public class Pet { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Pet pet = (Pet) o; - return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && - Objects.equals(this.name, pet.name) && - Objects.equals(this.photoUrls, pet.photoUrls) && - Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pig.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pig.java index 16cb5a576e2..ec067e21df8 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pig.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pig.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Quadrilateral.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Quadrilateral.java index 3d0dea5e0ce..0bd869d79a0 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Quadrilateral.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Quadrilateral.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index b143ca302ec..949b2c84875 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -75,19 +77,12 @@ public class QuadrilateralInterface { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuadrilateralInterface quadrilateralInterface = (QuadrilateralInterface) o; - return Objects.equals(this.quadrilateralType, quadrilateralInterface.quadrilateralType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(quadrilateralType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 8cfa6a5ae6f..25adc586f1d 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -103,20 +105,12 @@ public class ReadOnlyFirst { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar, baz); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index 3714690b948..9c57722230a 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -148,21 +150,12 @@ public class ScaleneTriangle { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ScaleneTriangle scaleneTriangle = (ScaleneTriangle) o; - return Objects.equals(this.shapeType, scaleneTriangle.shapeType) && - Objects.equals(this.triangleType, scaleneTriangle.triangleType)&& - Objects.equals(this.additionalProperties, scaleneTriangle.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Shape.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Shape.java index efa80a0e1e0..aeab1549cc6 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Shape.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Shape.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeInterface.java index c24a869e117..63d2b7745ad 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -75,19 +77,12 @@ public class ShapeInterface { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ShapeInterface shapeInterface = (ShapeInterface) o; - return Objects.equals(this.shapeType, shapeInterface.shapeType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeOrNull.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeOrNull.java index 5bf7e348066..a8dc5254845 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeOrNull.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeOrNull.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index 7fd5a7fc8f6..98fe5d7e3c4 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -148,21 +150,12 @@ public class SimpleQuadrilateral { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SimpleQuadrilateral simpleQuadrilateral = (SimpleQuadrilateral) o; - return Objects.equals(this.shapeType, simpleQuadrilateral.shapeType) && - Objects.equals(this.quadrilateralType, simpleQuadrilateral.quadrilateralType)&& - Objects.equals(this.additionalProperties, simpleQuadrilateral.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, quadrilateralType, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SpecialModelName.java index ae88910475e..40980808541 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -106,20 +108,12 @@ public class SpecialModelName { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName) && - Objects.equals(this.specialModelName, specialModelName.specialModelName); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash($specialPropertyName, specialModelName); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Tag.java index 14fd4f1c766..ba300d4c073 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Tag.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -105,20 +107,12 @@ public class Tag { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index deeba97cf15..d9efa6f38b4 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -116,20 +118,12 @@ public class TestInlineFreeformAdditionalPropertiesRequest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = (TestInlineFreeformAdditionalPropertiesRequest) o; - return Objects.equals(this.someProperty, testInlineFreeformAdditionalPropertiesRequest.someProperty)&& - Objects.equals(this.additionalProperties, testInlineFreeformAdditionalPropertiesRequest.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(someProperty, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Triangle.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Triangle.java index 65bc16911cf..1d54ef1adea 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Triangle.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Triangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TriangleInterface.java index 374c7406828..eb2b25d202a 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -75,19 +77,12 @@ public class TriangleInterface { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TriangleInterface triangleInterface = (TriangleInterface) o; - return Objects.equals(this.triangleType, triangleInterface.triangleType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(triangleType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/User.java index f515fdb5a1f..8df0a4c4ca8 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/User.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -440,25 +442,7 @@ public class User { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.id, user.id) && - Objects.equals(this.username, user.username) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.email, user.email) && - Objects.equals(this.password, user.password) && - Objects.equals(this.phone, user.phone) && - Objects.equals(this.userStatus, user.userStatus) && - Objects.equals(this.objectWithNoDeclaredProps, user.objectWithNoDeclaredProps) && - equalsNullable(this.objectWithNoDeclaredPropsNullable, user.objectWithNoDeclaredPropsNullable) && - equalsNullable(this.anyTypeProp, user.anyTypeProp) && - equalsNullable(this.anyTypePropNullable, user.anyTypePropNullable); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -467,7 +451,7 @@ public class User { @Override public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus, objectWithNoDeclaredProps, hashCodeNullable(objectWithNoDeclaredPropsNullable), hashCodeNullable(anyTypeProp), hashCodeNullable(anyTypePropNullable)); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Whale.java index f82b8c58919..2912a02ef2f 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Whale.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -138,21 +140,12 @@ public class Whale { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Whale whale = (Whale) o; - return Objects.equals(this.hasBaleen, whale.hasBaleen) && - Objects.equals(this.hasTeeth, whale.hasTeeth) && - Objects.equals(this.className, whale.className); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(hasBaleen, hasTeeth, className); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Zebra.java index 7d2e7458855..560538a8160 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Zebra.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -185,21 +187,12 @@ public class Zebra { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Zebra zebra = (Zebra) o; - return Objects.equals(this.type, zebra.type) && - Objects.equals(this.className, zebra.className)&& - Objects.equals(this.additionalProperties, zebra.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(type, className, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator-ignore b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/FILES new file mode 100644 index 00000000000..ae145903e52 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/FILES @@ -0,0 +1,22 @@ +README.md +docs/Category.md +docs/ModelApiResponse.md +docs/Order.md +docs/Pet.md +docs/PetApi.md +docs/StoreApi.md +docs/Tag.md +docs/User.md +docs/UserApi.md +pom.xml +src/main/java/org/openapitools/client/api/ApiException.java +src/main/java/org/openapitools/client/api/ApiExceptionMapper.java +src/main/java/org/openapitools/client/api/PetApi.java +src/main/java/org/openapitools/client/api/StoreApi.java +src/main/java/org/openapitools/client/api/UserApi.java +src/main/java/org/openapitools/client/model/Category.java +src/main/java/org/openapitools/client/model/ModelApiResponse.java +src/main/java/org/openapitools/client/model/Order.java +src/main/java/org/openapitools/client/model/Pet.java +src/main/java/org/openapitools/client/model/Tag.java +src/main/java/org/openapitools/client/model/User.java diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/VERSION new file mode 100644 index 00000000000..6935482704c --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.10.0-SNAPSHOT diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/README.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/README.md new file mode 100644 index 00000000000..4c3e40a34b5 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/README.md @@ -0,0 +1,9 @@ +# OpenAPI Petstore - MicroProfile Rest Client & MicroProfile Server + +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +[MicroProfile Rest Client](https://github.com/eclipse/microprofile-rest-client) is a type-safe way of calling +REST services. The generated client contains an interface which acts as the client, you can inject it into dependent classes. + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Category.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Category.md new file mode 100644 index 00000000000..a7fc939d252 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Category.md @@ -0,0 +1,15 @@ + + +# Category + +A category for a pet + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/ModelApiResponse.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/ModelApiResponse.md new file mode 100644 index 00000000000..cd7e3c400be --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/ModelApiResponse.md @@ -0,0 +1,16 @@ + + +# ModelApiResponse + +Describes the result of uploading an image resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Order.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Order.md new file mode 100644 index 00000000000..7bfa42e6a90 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Order.md @@ -0,0 +1,29 @@ + + +# Order + +An order for a pets from the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **Date** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Pet.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Pet.md new file mode 100644 index 00000000000..8bb36330123 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Pet.md @@ -0,0 +1,29 @@ + + +# Pet + +A pet for sale in the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/PetApi.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/PetApi.md new file mode 100644 index 00000000000..fb5361b0808 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/PetApi.md @@ -0,0 +1,604 @@ +# PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store | +| [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet | +| [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status | +| [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags | +| [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID | +| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet | +| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data | +| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image | + + + +## addPet + +> Pet addPet(pet) + +Add a new pet to the store + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.addPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + + +## deletePet + +> void deletePet(petId, apiKey) + +Deletes a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + void result = apiInstance.deletePet(petId, apiKey); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | + +### Return type + +[**void**](Void.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid pet value | - | + + +## findPetsByStatus + +> List<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + + +## findPetsByTags + +> List<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**List<String>**](String.md)| Tags to filter by | | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + + +## getPetById + +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + + +## updatePet + +> Pet updatePet(pet) + +Update an existing pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.updatePet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + + +## updatePetWithForm + +> void updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + void result = apiInstance.updatePetWithForm(petId, name, status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | + +### Return type + +[**void**](Void.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + + +## uploadFile + +> ModelApiResponse uploadFile(petId, additionalMetadata, _file) + +uploads an image + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File _file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, _file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/StoreApi.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/StoreApi.md new file mode 100644 index 00000000000..ae64b8574e2 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/StoreApi.md @@ -0,0 +1,283 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID | +| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | +| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID | +| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | + + + +## deleteOrder + +> void deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + void result = apiInstance.deleteOrder(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | + +### Return type + +[**void**](Void.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## getInventory + +> Map<String, Integer> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Map<String, Integer>** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## getOrderById + +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## placeOrder + +> Order placeOrder(order) + +Place an order for a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Order order = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(order); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Tag.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Tag.md new file mode 100644 index 00000000000..abfde4afb50 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/Tag.md @@ -0,0 +1,15 @@ + + +# Tag + +A tag for a pet + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/User.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/User.md new file mode 100644 index 00000000000..426845227bd --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/User.md @@ -0,0 +1,21 @@ + + +# User + +A User who is purchasing from the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/UserApi.md b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/UserApi.md new file mode 100644 index 00000000000..89c1bfc6026 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/docs/UserApi.md @@ -0,0 +1,591 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createUser**](UserApi.md#createUser) | **POST** /user | Create user | +| [**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array | +| [**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array | +| [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user | +| [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name | +| [**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system | +| [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session | +| [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user | + + + +## createUser + +> void createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + User user = new User(); // User | Created user object + try { + void result = apiInstance.createUser(user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**User**](User.md)| Created user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## createUsersWithArrayInput + +> void createUsersWithArrayInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + void result = apiInstance.createUsersWithArrayInput(user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## createUsersWithListInput + +> void createUsersWithListInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + void result = apiInstance.createUsersWithListInput(user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## deleteUser + +> void deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + void result = apiInstance.deleteUser(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## getUserByName + +> User getUserByName(username) + +Get user by user name + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## loginUser + +> String loginUser(username, password) + +Logs user into the system + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + + +## logoutUser + +> void logoutUser() + +Logs out current logged in user session + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + void result = apiInstance.logoutUser(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## updateUser + +> void updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User user = new User(); // User | Updated user object + try { + void result = apiInstance.updateUser(username, user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **user** | [**User**](User.md)| Updated user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/pom.xml b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/pom.xml new file mode 100644 index 00000000000..5dfda58407b --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/pom.xml @@ -0,0 +1,184 @@ + + 4.0.0 + org.openapitools + microprofile-rest-client-3-mutiny + jar + microprofile-rest-client-3-mutiny + This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + 1.0.0 + + src/main/java + + + org.jboss.jandex + jandex-maven-plugin + ${jandex.maven.plugin.version} + + + make-index + + jandex + + + + + + maven-failsafe-plugin + ${maven.failsafe.plugin.version} + + + + integration-test + verify + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${build.helper.maven.plugin.version} + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + + org.eclipse.microprofile.rest.client + microprofile-rest-client-api + ${microprofile.rest.client.api.version} + + + + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs.version} + provided + + + + org.glassfish.jersey.ext.microprofile + jersey-mp-rest-client + ${jersey.mp.rest.client.version} + test + + + org.apache.geronimo.config + geronimo-config-impl + ${geronimo.config.impl.version} + test + + + + org.apache.cxf + cxf-rt-rs-extension-providers + ${cxf.rt.rs.extension.providers.version} + + + jakarta.json.bind + jakarta.json.bind-api + ${jakarta.json.bind.version} + + + jakarta.json + jakarta.json-api + ${jakarta.json.version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind.version} + + + com.sun.xml.bind + jaxb-core + ${jaxb.core.version} + + + com.sun.xml.bind + jaxb-impl + ${jaxb.impl.version} + + + jakarta.activation + jakarta.activation-api + ${jakarta.activation.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson.jaxrs.version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta.annotation.version} + provided + + + io.smallrye.reactive + mutiny + ${mutiny.version} + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + + + + + 11 + ${java.version} + ${java.version} + UTF-8 + + 1.5.18 + 9.2.9.v20150224 + 5.10.2 + 1.4.14 + 3.2.7 + 2.17.1 + 2.1.0 + 2.0.0 + 2.0.0 + 2.0.1 + 3.0.0 + 3.0.1 + 3.0 + 3.0.4 + 1.2.3 + 3.5.1 + 3.0.2 + 3.0.2 + 7.0.4.Final + 1.1.0 + 2.6 + 1.9.1 + 1.10.0 + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/ApiException.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/ApiException.java new file mode 100644 index 00000000000..2fc6d04ee68 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/ApiException.java @@ -0,0 +1,34 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import jakarta.ws.rs.core.Response; + +public class ApiException extends Exception { + + private static final long serialVersionUID = 1L; + private Response response; + + public ApiException() { + super(); + } + + public ApiException(Response response) { + super("Api response has status code " + response.getStatus()); + this.response = response; + } + + public Response getResponse() { + return this.response; + } +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/ApiExceptionMapper.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/ApiExceptionMapper.java new file mode 100644 index 00000000000..0dec2c6aec0 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/ApiExceptionMapper.java @@ -0,0 +1,33 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.ext.Provider; +import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper; + +@Provider +public class ApiExceptionMapper + implements ResponseExceptionMapper { + + @Override + public boolean handles(int status, MultivaluedMap headers) { + return status >= 400; + } + + @Override + public ApiException toThrowable(Response response) { + return new ApiException(response); + } +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/PetApi.java new file mode 100644 index 00000000000..78f82537054 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/PetApi.java @@ -0,0 +1,137 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.MediaType; +import org.apache.cxf.jaxrs.ext.multipart.*; +import io.smallrye.mutiny.Uni; + + +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +/** + * OpenAPI Petstore + * + *

This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + */ + +@RegisterRestClient(configKey="petstore") +@RegisterProvider(ApiExceptionMapper.class) +@Path("/pet") +public interface PetApi { + + /** + * Add a new pet to the store + * + * + * + */ + @POST + + @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) + Uni addPet(Pet pet) throws ApiException, ProcessingException; + + /** + * Deletes a pet + * + * + * + */ + @DELETE + @Path("/{petId}") + Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException; + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + */ + @GET + @Path("/findByStatus") + @Produces({ "application/xml", "application/json" }) + Uni> findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @deprecated + */ + @Deprecated + @GET + @Path("/findByTags") + @Produces({ "application/xml", "application/json" }) + Uni> findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException; + + /** + * Find pet by ID + * + * Returns a single pet + * + */ + @GET + @Path("/{petId}") + @Produces({ "application/xml", "application/json" }) + Uni getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + + /** + * Update an existing pet + * + * + * + */ + @PUT + + @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) + Uni updatePet(Pet pet) throws ApiException, ProcessingException; + + /** + * Updates a pet in the store with form data + * + * + * + */ + @POST + @Path("/{petId}") + @Consumes({ "application/x-www-form-urlencoded" }) + Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException; + + /** + * uploads an image + * + * + * + */ + @POST + @Path("/{petId}/uploadImage") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException; +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java new file mode 100644 index 00000000000..3e3568235bc --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java @@ -0,0 +1,87 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import org.openapitools.client.model.Order; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.MediaType; +import org.apache.cxf.jaxrs.ext.multipart.*; +import io.smallrye.mutiny.Uni; + + +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +/** + * OpenAPI Petstore + * + *

This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + */ + +@RegisterRestClient(configKey="petstore") +@RegisterProvider(ApiExceptionMapper.class) +@Path("/store") +public interface StoreApi { + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + */ + @DELETE + @Path("/order/{orderId}") + Uni deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException; + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + */ + @GET + @Path("/inventory") + @Produces({ "application/json" }) + Uni> getInventory() throws ApiException, ProcessingException; + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + */ + @GET + @Path("/order/{orderId}") + @Produces({ "application/xml", "application/json" }) + Uni getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException; + + /** + * Place an order for a pet + * + * + * + */ + @POST + @Path("/order") + @Consumes({ "application/json" }) + @Produces({ "application/xml", "application/json" }) + Uni placeOrder(Order order) throws ApiException, ProcessingException; +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/UserApi.java new file mode 100644 index 00000000000..398314fe46c --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/UserApi.java @@ -0,0 +1,130 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.util.Date; +import org.openapitools.client.model.User; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.MediaType; +import org.apache.cxf.jaxrs.ext.multipart.*; +import io.smallrye.mutiny.Uni; + + +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +/** + * OpenAPI Petstore + * + *

This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + */ + +@RegisterRestClient(configKey="petstore") +@RegisterProvider(ApiExceptionMapper.class) +@Path("/user") +public interface UserApi { + + /** + * Create user + * + * This can only be done by the logged in user. + * + */ + @POST + + @Consumes({ "application/json" }) + Uni createUser(User user) throws ApiException, ProcessingException; + + /** + * Creates list of users with given input array + * + * + * + */ + @POST + @Path("/createWithArray") + @Consumes({ "application/json" }) + Uni createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + + /** + * Creates list of users with given input array + * + * + * + */ + @POST + @Path("/createWithList") + @Consumes({ "application/json" }) + Uni createUsersWithListInput(List user) throws ApiException, ProcessingException; + + /** + * Delete user + * + * This can only be done by the logged in user. + * + */ + @DELETE + @Path("/{username}") + Uni deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + + /** + * Get user by user name + * + * + * + */ + @GET + @Path("/{username}") + @Produces({ "application/xml", "application/json" }) + Uni getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + + /** + * Logs user into the system + * + * + * + */ + @GET + @Path("/login") + @Produces({ "application/xml", "application/json" }) + Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + + /** + * Logs out current logged in user session + * + * + * + */ + @GET + @Path("/logout") + Uni logoutUser() throws ApiException, ProcessingException; + + /** + * Updated user + * + * This can only be done by the logged in user. + * + */ + @PUT + @Path("/{username}") + @Consumes({ "application/json" }) + Uni updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 00000000000..d7d5dca2bc6 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,123 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * A category for a pet + */ + +public class Category { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("name") + private String name; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + /** + * Set name + */ + public void setName(String name) { + this.name = name; + } + + public Category name(String name) { + this.name = name; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/ModelApiResponse.java new file mode 100644 index 00000000000..2791024ba29 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -0,0 +1,148 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * Describes the result of uploading an image resource + */ + +public class ModelApiResponse { + + @JsonbProperty("code") + private Integer code; + + @JsonbProperty("type") + private String type; + + @JsonbProperty("message") + private String message; + + /** + * Get code + * @return code + **/ + public Integer getCode() { + return code; + } + + /** + * Set code + */ + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get type + * @return type + **/ + public String getType() { + return type; + } + + /** + * Set type + */ + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get message + * @return message + **/ + public String getMessage() { + return message; + } + + /** + * Set message + */ + public void setMessage(String message) { + this.message = message; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Order.java new file mode 100644 index 00000000000..d7e654ce3a9 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Order.java @@ -0,0 +1,269 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.util.Date; +import java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * An order for a pets from the pet store + */ + +public class Order { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("petId") + private Long petId; + + @JsonbProperty("quantity") + private Integer quantity; + + @JsonbProperty("shipDate") + private Date shipDate; + + @JsonbTypeSerializer(StatusEnum.Serializer.class) + @JsonbTypeDeserializer(StatusEnum.Deserializer.class) + public enum StatusEnum { + + PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); + + + String value; + + StatusEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static final class Deserializer implements JsonbDeserializer { + @Override + public StatusEnum deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'"); + } + } + + public static final class Serializer implements JsonbSerializer { + @Override + public void serialize(StatusEnum obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value); + } + } + } + + /** + * Order Status + */ + @JsonbProperty("status") + private StatusEnum status; + + @JsonbProperty("complete") + private Boolean complete = false; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get petId + * @return petId + **/ + public Long getPetId() { + return petId; + } + + /** + * Set petId + */ + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + public Integer getQuantity() { + return quantity; + } + + /** + * Set quantity + */ + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + public Date getShipDate() { + return shipDate; + } + + /** + * Set shipDate + */ + public void setShipDate(Date shipDate) { + this.shipDate = shipDate; + } + + public Order shipDate(Date shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Order Status + * @return status + **/ + public StatusEnum getStatus() { + return status; + } + + /** + * Set status + */ + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get complete + * @return complete + **/ + public Boolean getComplete() { + return complete; + } + + /** + * Set complete + */ + public void setComplete(Boolean complete) { + this.complete = complete; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 00000000000..d2b51d9db1c --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,291 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * A pet for sale in the pet store + */ + +public class Pet { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("category") + private Category category; + + @JsonbProperty("name") + private String name; + + @JsonbProperty("photoUrls") + private List photoUrls = new ArrayList<>(); + + @JsonbProperty("tags") + private List tags = null; + + @JsonbTypeSerializer(StatusEnum.Serializer.class) + @JsonbTypeDeserializer(StatusEnum.Deserializer.class) + public enum StatusEnum { + + AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); + + + String value; + + StatusEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static final class Deserializer implements JsonbDeserializer { + @Override + public StatusEnum deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'"); + } + } + + public static final class Serializer implements JsonbSerializer { + @Override + public void serialize(StatusEnum obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value); + } + } + } + + /** + * pet status in the store + */ + @JsonbProperty("status") + private StatusEnum status; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get category + * @return category + **/ + public Category getCategory() { + return category; + } + + /** + * Set category + */ + public void setCategory(Category category) { + this.category = category; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + /** + * Set name + */ + public void setName(String name) { + this.name = name; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + public List getPhotoUrls() { + return photoUrls; + } + + /** + * Set photoUrls + */ + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new ArrayList<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + public List getTags() { + return tags; + } + + /** + * Set tags + */ + public void setTags(List tags) { + this.tags = tags; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * pet status in the store + * @return status + * @deprecated + **/ + @Deprecated + public StatusEnum getStatus() { + return status; + } + + /** + * Set status + */ + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 00000000000..1317a25b177 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,123 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * A tag for a pet + */ + +public class Tag { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("name") + private String name; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + /** + * Set name + */ + public void setName(String name) { + this.name = name; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/User.java new file mode 100644 index 00000000000..d717a4bd321 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/model/User.java @@ -0,0 +1,276 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * A User who is purchasing from the pet store + */ + +public class User { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("username") + private String username; + + @JsonbProperty("firstName") + private String firstName; + + @JsonbProperty("lastName") + private String lastName; + + @JsonbProperty("email") + private String email; + + @JsonbProperty("password") + private String password; + + @JsonbProperty("phone") + private String phone; + + /** + * User Status + */ + @JsonbProperty("userStatus") + private Integer userStatus; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get username + * @return username + **/ + public String getUsername() { + return username; + } + + /** + * Set username + */ + public void setUsername(String username) { + this.username = username; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + public String getFirstName() { + return firstName; + } + + /** + * Set firstName + */ + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + public String getLastName() { + return lastName; + } + + /** + * Set lastName + */ + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get email + * @return email + **/ + public String getEmail() { + return email; + } + + /** + * Set email + */ + public void setEmail(String email) { + this.email = email; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get password + * @return password + **/ + public String getPassword() { + return password; + } + + /** + * Set password + */ + public void setPassword(String password) { + this.password = password; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get phone + * @return phone + **/ + public String getPhone() { + return phone; + } + + /** + * Set phone + */ + public void setPhone(String phone) { + this.phone = phone; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * User Status + * @return userStatus + **/ + public Integer getUserStatus() { + return userStatus; + } + + /** + * Set userStatus + */ + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/api/PetApiTest.java new file mode 100644 index 00000000000..a08c4178f40 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -0,0 +1,198 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * OpenAPI Petstore Test + * + * API tests for PetApi + */ +public class PetApiTest { + + private PetApi client; + private String baseUrl = "http://localhost:9080"; + + @BeforeEach + public void setup() throws MalformedURLException { + // TODO initialize the client + } + + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addPetTest() { + // TODO: test validations + Pet pet = null; + //Uni response = api.addPet(pet); + //Assertions.assertNotNull(response); + + + } + + /** + * Deletes a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deletePetTest() { + // TODO: test validations + Long petId = null; + String apiKey = null; + //api.deletePet(petId, apiKey); + //Assertions.assertNotNull(response); + + + } + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void findPetsByStatusTest() { + // TODO: test validations + List status = null; + //Uni> response = api.findPetsByStatus(status); + //Assertions.assertNotNull(response); + + + } + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void findPetsByTagsTest() { + // TODO: test validations + List tags = null; + //Uni> response = api.findPetsByTags(tags); + //Assertions.assertNotNull(response); + + + } + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getPetByIdTest() { + // TODO: test validations + Long petId = null; + //Uni response = api.getPetById(petId); + //Assertions.assertNotNull(response); + + + } + + /** + * Update an existing pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updatePetTest() { + // TODO: test validations + Pet pet = null; + //Uni response = api.updatePet(pet); + //Assertions.assertNotNull(response); + + + } + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updatePetWithFormTest() { + // TODO: test validations + Long petId = null; + String name = null; + String status = null; + //api.updatePetWithForm(petId, name, status); + //Assertions.assertNotNull(response); + + + } + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileTest() { + // TODO: test validations + Long petId = null; + String additionalMetadata = null; + org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; + //Uni response = api.uploadFile(petId, additionalMetadata, _file); + //Assertions.assertNotNull(response); + + + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/api/StoreApiTest.java new file mode 100644 index 00000000000..14e07617aa1 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -0,0 +1,118 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import org.openapitools.client.model.Order; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * OpenAPI Petstore Test + * + * API tests for StoreApi + */ +public class StoreApiTest { + + private StoreApi client; + private String baseUrl = "http://localhost:9080"; + + @BeforeEach + public void setup() throws MalformedURLException { + // TODO initialize the client + } + + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteOrderTest() { + // TODO: test validations + String orderId = null; + //api.deleteOrder(orderId); + //Assertions.assertNotNull(response); + + + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getInventoryTest() { + // TODO: test validations + //Uni> response = api.getInventory(); + //Assertions.assertNotNull(response); + + + } + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getOrderByIdTest() { + // TODO: test validations + Long orderId = null; + //Uni response = api.getOrderById(orderId); + //Assertions.assertNotNull(response); + + + } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void placeOrderTest() { + // TODO: test validations + Order order = null; + //Uni response = api.placeOrder(order); + //Assertions.assertNotNull(response); + + + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/api/UserApiTest.java new file mode 100644 index 00000000000..61e04bc03b7 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -0,0 +1,193 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.util.Date; +import org.openapitools.client.model.User; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * OpenAPI Petstore Test + * + * API tests for UserApi + */ +public class UserApiTest { + + private UserApi client; + private String baseUrl = "http://localhost:9080"; + + @BeforeEach + public void setup() throws MalformedURLException { + // TODO initialize the client + } + + + /** + * Create user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUserTest() { + // TODO: test validations + User user = null; + //api.createUser(user); + //Assertions.assertNotNull(response); + + + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUsersWithArrayInputTest() { + // TODO: test validations + List user = null; + //api.createUsersWithArrayInput(user); + //Assertions.assertNotNull(response); + + + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUsersWithListInputTest() { + // TODO: test validations + List user = null; + //api.createUsersWithListInput(user); + //Assertions.assertNotNull(response); + + + } + + /** + * Delete user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteUserTest() { + // TODO: test validations + String username = null; + //api.deleteUser(username); + //Assertions.assertNotNull(response); + + + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getUserByNameTest() { + // TODO: test validations + String username = null; + //Uni response = api.getUserByName(username); + //Assertions.assertNotNull(response); + + + } + + /** + * Logs user into the system + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void loginUserTest() { + // TODO: test validations + String username = null; + String password = null; + //Uni response = api.loginUser(username, password); + //Assertions.assertNotNull(response); + + + } + + /** + * Logs out current logged in user session + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void logoutUserTest() { + // TODO: test validations + //api.logoutUser(); + //Assertions.assertNotNull(response); + + + } + + /** + * Updated user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateUserTest() { + // TODO: test validations + String username = null; + User user = null; + //api.updateUser(username, user); + //Assertions.assertNotNull(response); + + + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 00000000000..d0568f97766 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,50 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Category + */ +class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..ddfa78c4ac3 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -0,0 +1,58 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModelApiResponse + */ +class ModelApiResponseTest { + private final ModelApiResponse model = new ModelApiResponse(); + + /** + * Model tests for ModelApiResponse + */ + @Test + void testModelApiResponse() { + // TODO: test ModelApiResponse + } + + /** + * Test the property 'code' + */ + @Test + void codeTest() { + // TODO: test code + } + + /** + * Test the property 'type' + */ + @Test + void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + void messageTest() { + // TODO: test message + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/OrderTest.java new file mode 100644 index 00000000000..0d23109bd82 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/OrderTest.java @@ -0,0 +1,83 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Date; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Order + */ +class OrderTest { + private final Order model = new Order(); + + /** + * Model tests for Order + */ + @Test + void testOrder() { + // TODO: test Order + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'petId' + */ + @Test + void petIdTest() { + // TODO: test petId + } + + /** + * Test the property 'quantity' + */ + @Test + void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'shipDate' + */ + @Test + void shipDateTest() { + // TODO: test shipDate + } + + /** + * Test the property 'status' + */ + @Test + void statusTest() { + // TODO: test status + } + + /** + * Test the property 'complete' + */ + @Test + void completeTest() { + // TODO: test complete + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 00000000000..e939e3b1d45 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,87 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Pet + */ +class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'category' + */ + @Test + void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + + /** + * Test the property 'photoUrls' + */ + @Test + void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 00000000000..5131a8a3e88 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,50 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Tag + */ +class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/UserTest.java new file mode 100644 index 00000000000..d0d84b12705 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/test/java/org/openapitools/client/model/UserTest.java @@ -0,0 +1,98 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for User + */ +class UserTest { + private final User model = new User(); + + /** + * Model tests for User + */ + @Test + void testUser() { + // TODO: test User + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'username' + */ + @Test + void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'firstName' + */ + @Test + void firstNameTest() { + // TODO: test firstName + } + + /** + * Test the property 'lastName' + */ + @Test + void lastNameTest() { + // TODO: test lastName + } + + /** + * Test the property 'email' + */ + @Test + void emailTest() { + // TODO: test email + } + + /** + * Test the property 'password' + */ + @Test + void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'phone' + */ + @Test + void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'userStatus' + */ + @Test + void userStatusTest() { + // TODO: test userStatus + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator-ignore b/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/FILES new file mode 100644 index 00000000000..ae145903e52 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/FILES @@ -0,0 +1,22 @@ +README.md +docs/Category.md +docs/ModelApiResponse.md +docs/Order.md +docs/Pet.md +docs/PetApi.md +docs/StoreApi.md +docs/Tag.md +docs/User.md +docs/UserApi.md +pom.xml +src/main/java/org/openapitools/client/api/ApiException.java +src/main/java/org/openapitools/client/api/ApiExceptionMapper.java +src/main/java/org/openapitools/client/api/PetApi.java +src/main/java/org/openapitools/client/api/StoreApi.java +src/main/java/org/openapitools/client/api/UserApi.java +src/main/java/org/openapitools/client/model/Category.java +src/main/java/org/openapitools/client/model/ModelApiResponse.java +src/main/java/org/openapitools/client/model/Order.java +src/main/java/org/openapitools/client/model/Pet.java +src/main/java/org/openapitools/client/model/Tag.java +src/main/java/org/openapitools/client/model/User.java diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/VERSION new file mode 100644 index 00000000000..6935482704c --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.10.0-SNAPSHOT diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/README.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/README.md new file mode 100644 index 00000000000..4c3e40a34b5 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/README.md @@ -0,0 +1,9 @@ +# OpenAPI Petstore - MicroProfile Rest Client & MicroProfile Server + +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +[MicroProfile Rest Client](https://github.com/eclipse/microprofile-rest-client) is a type-safe way of calling +REST services. The generated client contains an interface which acts as the client, you can inject it into dependent classes. + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Category.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Category.md new file mode 100644 index 00000000000..a7fc939d252 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Category.md @@ -0,0 +1,15 @@ + + +# Category + +A category for a pet + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/ModelApiResponse.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/ModelApiResponse.md new file mode 100644 index 00000000000..cd7e3c400be --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/ModelApiResponse.md @@ -0,0 +1,16 @@ + + +# ModelApiResponse + +Describes the result of uploading an image resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Order.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Order.md new file mode 100644 index 00000000000..7bfa42e6a90 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Order.md @@ -0,0 +1,29 @@ + + +# Order + +An order for a pets from the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **Date** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Pet.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Pet.md new file mode 100644 index 00000000000..8bb36330123 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Pet.md @@ -0,0 +1,29 @@ + + +# Pet + +A pet for sale in the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/PetApi.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/PetApi.md new file mode 100644 index 00000000000..fb5361b0808 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/PetApi.md @@ -0,0 +1,604 @@ +# PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store | +| [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet | +| [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status | +| [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags | +| [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID | +| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet | +| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data | +| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image | + + + +## addPet + +> Pet addPet(pet) + +Add a new pet to the store + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.addPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + + +## deletePet + +> void deletePet(petId, apiKey) + +Deletes a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + void result = apiInstance.deletePet(petId, apiKey); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | + +### Return type + +[**void**](Void.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid pet value | - | + + +## findPetsByStatus + +> List<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + + +## findPetsByTags + +> List<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**List<String>**](String.md)| Tags to filter by | | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + + +## getPetById + +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + + +## updatePet + +> Pet updatePet(pet) + +Update an existing pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.updatePet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + + +## updatePetWithForm + +> void updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + void result = apiInstance.updatePetWithForm(petId, name, status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | + +### Return type + +[**void**](Void.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + + +## uploadFile + +> ModelApiResponse uploadFile(petId, additionalMetadata, _file) + +uploads an image + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File _file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, _file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/StoreApi.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/StoreApi.md new file mode 100644 index 00000000000..ae64b8574e2 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/StoreApi.md @@ -0,0 +1,283 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID | +| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | +| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID | +| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | + + + +## deleteOrder + +> void deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + void result = apiInstance.deleteOrder(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | + +### Return type + +[**void**](Void.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## getInventory + +> Map<String, Integer> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Map<String, Integer>** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## getOrderById + +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## placeOrder + +> Order placeOrder(order) + +Place an order for a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Order order = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(order); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Tag.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Tag.md new file mode 100644 index 00000000000..abfde4afb50 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/Tag.md @@ -0,0 +1,15 @@ + + +# Tag + +A tag for a pet + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/User.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/User.md new file mode 100644 index 00000000000..426845227bd --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/User.md @@ -0,0 +1,21 @@ + + +# User + +A User who is purchasing from the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/UserApi.md b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/UserApi.md new file mode 100644 index 00000000000..89c1bfc6026 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/docs/UserApi.md @@ -0,0 +1,591 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createUser**](UserApi.md#createUser) | **POST** /user | Create user | +| [**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array | +| [**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array | +| [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user | +| [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name | +| [**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system | +| [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session | +| [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user | + + + +## createUser + +> void createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + User user = new User(); // User | Created user object + try { + void result = apiInstance.createUser(user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**User**](User.md)| Created user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## createUsersWithArrayInput + +> void createUsersWithArrayInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + void result = apiInstance.createUsersWithArrayInput(user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## createUsersWithListInput + +> void createUsersWithListInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + void result = apiInstance.createUsersWithListInput(user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## deleteUser + +> void deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + void result = apiInstance.deleteUser(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## getUserByName + +> User getUserByName(username) + +Get user by user name + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## loginUser + +> String loginUser(username, password) + +Logs user into the system + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + + +## logoutUser + +> void logoutUser() + +Logs out current logged in user session + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + void result = apiInstance.logoutUser(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## updateUser + +> void updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User user = new User(); // User | Updated user object + try { + void result = apiInstance.updateUser(username, user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **user** | [**User**](User.md)| Updated user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/pom.xml b/samples/client/petstore/java/microprofile-rest-client-mutiny/pom.xml new file mode 100644 index 00000000000..d9ca684ed95 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/pom.xml @@ -0,0 +1,184 @@ + + 4.0.0 + org.openapitools + microprofile-rest-client-mutiny + jar + microprofile-rest-client-mutiny + This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + 1.0.0 + + src/main/java + + + org.jboss.jandex + jandex-maven-plugin + ${jandex.maven.plugin.version} + + + make-index + + jandex + + + + + + maven-failsafe-plugin + ${maven.failsafe.plugin.version} + + + + integration-test + verify + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${build.helper.maven.plugin.version} + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + + org.eclipse.microprofile.rest.client + microprofile-rest-client-api + ${microprofile.rest.client.api.version} + + + + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs.version} + provided + + + + io.smallrye + smallrye-rest-client + ${smallrye.rest.client.version} + test + + + + io.smallrye + smallrye-config + ${smallrye.config.version} + test + + + org.apache.cxf + cxf-rt-rs-extension-providers + ${cxf.rt.rs.extension.providers.version} + + + jakarta.json.bind + jakarta.json.bind-api + ${jakarta.json.bind.version} + + + jakarta.json + jakarta.json-api + ${jakarta.json.version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind.version} + + + com.sun.xml.bind + jaxb-core + ${jaxb.core.version} + + + com.sun.xml.bind + jaxb-impl + ${jaxb.impl.version} + + + jakarta.activation + jakarta.activation-api + ${jakarta.activation.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson.jaxrs.version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta.annotation.version} + provided + + + io.smallrye.reactive + mutiny + ${mutiny.version} + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + + + + + 1.8 + ${java.version} + ${java.version} + UTF-8 + + 1.5.18 + 9.2.9.v20150224 + 5.10.2 + 1.4.14 + 3.2.7 + 2.17.1 + 1.2.2 + 1.3.5 + 1.0.2 + 1.1.6 + 2.1.6 + 2.3.3 + 2.0 + 1.2.1 + 1.3.5 + 3.2.6 + 2.2.11 + 2.2.11 + 5.2.2.Final + 1.1.0 + 2.6 + 1.9.1 + 1.10.0 + + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/ApiException.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/ApiException.java new file mode 100644 index 00000000000..13fb50ad633 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/ApiException.java @@ -0,0 +1,34 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import javax.ws.rs.core.Response; + +public class ApiException extends Exception { + + private static final long serialVersionUID = 1L; + private Response response; + + public ApiException() { + super(); + } + + public ApiException(Response response) { + super("Api response has status code " + response.getStatus()); + this.response = response; + } + + public Response getResponse() { + return this.response; + } +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/ApiExceptionMapper.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/ApiExceptionMapper.java new file mode 100644 index 00000000000..51c2aa50a62 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/ApiExceptionMapper.java @@ -0,0 +1,33 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.Response; +import javax.ws.rs.ext.Provider; +import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper; + +@Provider +public class ApiExceptionMapper + implements ResponseExceptionMapper { + + @Override + public boolean handles(int status, MultivaluedMap headers) { + return status >= 400; + } + + @Override + public ApiException toThrowable(Response response) { + return new ApiException(response); + } +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/PetApi.java new file mode 100644 index 00000000000..0964ae15d4c --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/PetApi.java @@ -0,0 +1,137 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import javax.ws.rs.*; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.MediaType; +import org.apache.cxf.jaxrs.ext.multipart.*; +import io.smallrye.mutiny.Uni; + + +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +/** + * OpenAPI Petstore + * + *

This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + */ + +@RegisterRestClient(configKey="pet-api") +@RegisterProvider(ApiExceptionMapper.class) +@Path("/pet") +public interface PetApi { + + /** + * Add a new pet to the store + * + * + * + */ + @POST + + @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) + Uni addPet(Pet pet) throws ApiException, ProcessingException; + + /** + * Deletes a pet + * + * + * + */ + @DELETE + @Path("/{petId}") + Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException; + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + */ + @GET + @Path("/findByStatus") + @Produces({ "application/xml", "application/json" }) + Uni> findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @deprecated + */ + @Deprecated + @GET + @Path("/findByTags") + @Produces({ "application/xml", "application/json" }) + Uni> findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException; + + /** + * Find pet by ID + * + * Returns a single pet + * + */ + @GET + @Path("/{petId}") + @Produces({ "application/xml", "application/json" }) + Uni getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + + /** + * Update an existing pet + * + * + * + */ + @PUT + + @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) + Uni updatePet(Pet pet) throws ApiException, ProcessingException; + + /** + * Updates a pet in the store with form data + * + * + * + */ + @POST + @Path("/{petId}") + @Consumes({ "application/x-www-form-urlencoded" }) + Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException; + + /** + * uploads an image + * + * + * + */ + @POST + @Path("/{petId}/uploadImage") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException; +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java new file mode 100644 index 00000000000..de22bb71fd2 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java @@ -0,0 +1,87 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import org.openapitools.client.model.Order; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import javax.ws.rs.*; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.MediaType; +import org.apache.cxf.jaxrs.ext.multipart.*; +import io.smallrye.mutiny.Uni; + + +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +/** + * OpenAPI Petstore + * + *

This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + */ + +@RegisterRestClient(configKey="store-api") +@RegisterProvider(ApiExceptionMapper.class) +@Path("/store") +public interface StoreApi { + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + */ + @DELETE + @Path("/order/{orderId}") + Uni deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException; + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + */ + @GET + @Path("/inventory") + @Produces({ "application/json" }) + Uni> getInventory() throws ApiException, ProcessingException; + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + */ + @GET + @Path("/order/{orderId}") + @Produces({ "application/xml", "application/json" }) + Uni getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException; + + /** + * Place an order for a pet + * + * + * + */ + @POST + @Path("/order") + @Consumes({ "application/json" }) + @Produces({ "application/xml", "application/json" }) + Uni placeOrder(Order order) throws ApiException, ProcessingException; +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/UserApi.java new file mode 100644 index 00000000000..1fc96630b01 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/UserApi.java @@ -0,0 +1,130 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.util.Date; +import org.openapitools.client.model.User; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import javax.ws.rs.*; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.MediaType; +import org.apache.cxf.jaxrs.ext.multipart.*; +import io.smallrye.mutiny.Uni; + + +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +/** + * OpenAPI Petstore + * + *

This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + */ + +@RegisterRestClient(configKey="user-api") +@RegisterProvider(ApiExceptionMapper.class) +@Path("/user") +public interface UserApi { + + /** + * Create user + * + * This can only be done by the logged in user. + * + */ + @POST + + @Consumes({ "application/json" }) + Uni createUser(User user) throws ApiException, ProcessingException; + + /** + * Creates list of users with given input array + * + * + * + */ + @POST + @Path("/createWithArray") + @Consumes({ "application/json" }) + Uni createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + + /** + * Creates list of users with given input array + * + * + * + */ + @POST + @Path("/createWithList") + @Consumes({ "application/json" }) + Uni createUsersWithListInput(List user) throws ApiException, ProcessingException; + + /** + * Delete user + * + * This can only be done by the logged in user. + * + */ + @DELETE + @Path("/{username}") + Uni deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + + /** + * Get user by user name + * + * + * + */ + @GET + @Path("/{username}") + @Produces({ "application/xml", "application/json" }) + Uni getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + + /** + * Logs user into the system + * + * + * + */ + @GET + @Path("/login") + @Produces({ "application/xml", "application/json" }) + Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + + /** + * Logs out current logged in user session + * + * + * + */ + @GET + @Path("/logout") + Uni logoutUser() throws ApiException, ProcessingException; + + /** + * Updated user + * + * This can only be done by the logged in user. + * + */ + @PUT + @Path("/{username}") + @Consumes({ "application/json" }) + Uni updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 00000000000..5a53099479e --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,123 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.lang.reflect.Type; +import javax.json.bind.annotation.JsonbTypeDeserializer; +import javax.json.bind.annotation.JsonbTypeSerializer; +import javax.json.bind.serializer.DeserializationContext; +import javax.json.bind.serializer.JsonbDeserializer; +import javax.json.bind.serializer.JsonbSerializer; +import javax.json.bind.serializer.SerializationContext; +import javax.json.stream.JsonGenerator; +import javax.json.stream.JsonParser; +import javax.json.bind.annotation.JsonbProperty; + +/** + * A category for a pet + */ + +public class Category { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("name") + private String name; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + /** + * Set name + */ + public void setName(String name) { + this.name = name; + } + + public Category name(String name) { + this.name = name; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/ModelApiResponse.java new file mode 100644 index 00000000000..6926a2e2270 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -0,0 +1,148 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.lang.reflect.Type; +import javax.json.bind.annotation.JsonbTypeDeserializer; +import javax.json.bind.annotation.JsonbTypeSerializer; +import javax.json.bind.serializer.DeserializationContext; +import javax.json.bind.serializer.JsonbDeserializer; +import javax.json.bind.serializer.JsonbSerializer; +import javax.json.bind.serializer.SerializationContext; +import javax.json.stream.JsonGenerator; +import javax.json.stream.JsonParser; +import javax.json.bind.annotation.JsonbProperty; + +/** + * Describes the result of uploading an image resource + */ + +public class ModelApiResponse { + + @JsonbProperty("code") + private Integer code; + + @JsonbProperty("type") + private String type; + + @JsonbProperty("message") + private String message; + + /** + * Get code + * @return code + **/ + public Integer getCode() { + return code; + } + + /** + * Set code + */ + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get type + * @return type + **/ + public String getType() { + return type; + } + + /** + * Set type + */ + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get message + * @return message + **/ + public String getMessage() { + return message; + } + + /** + * Set message + */ + public void setMessage(String message) { + this.message = message; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Order.java new file mode 100644 index 00000000000..4f743c78a6c --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Order.java @@ -0,0 +1,269 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.util.Date; +import java.lang.reflect.Type; +import javax.json.bind.annotation.JsonbTypeDeserializer; +import javax.json.bind.annotation.JsonbTypeSerializer; +import javax.json.bind.serializer.DeserializationContext; +import javax.json.bind.serializer.JsonbDeserializer; +import javax.json.bind.serializer.JsonbSerializer; +import javax.json.bind.serializer.SerializationContext; +import javax.json.stream.JsonGenerator; +import javax.json.stream.JsonParser; +import javax.json.bind.annotation.JsonbProperty; + +/** + * An order for a pets from the pet store + */ + +public class Order { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("petId") + private Long petId; + + @JsonbProperty("quantity") + private Integer quantity; + + @JsonbProperty("shipDate") + private Date shipDate; + + @JsonbTypeSerializer(StatusEnum.Serializer.class) + @JsonbTypeDeserializer(StatusEnum.Deserializer.class) + public enum StatusEnum { + + PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); + + + String value; + + StatusEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static final class Deserializer implements JsonbDeserializer { + @Override + public StatusEnum deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'"); + } + } + + public static final class Serializer implements JsonbSerializer { + @Override + public void serialize(StatusEnum obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value); + } + } + } + + /** + * Order Status + */ + @JsonbProperty("status") + private StatusEnum status; + + @JsonbProperty("complete") + private Boolean complete = false; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get petId + * @return petId + **/ + public Long getPetId() { + return petId; + } + + /** + * Set petId + */ + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + public Integer getQuantity() { + return quantity; + } + + /** + * Set quantity + */ + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + public Date getShipDate() { + return shipDate; + } + + /** + * Set shipDate + */ + public void setShipDate(Date shipDate) { + this.shipDate = shipDate; + } + + public Order shipDate(Date shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Order Status + * @return status + **/ + public StatusEnum getStatus() { + return status; + } + + /** + * Set status + */ + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get complete + * @return complete + **/ + public Boolean getComplete() { + return complete; + } + + /** + * Set complete + */ + public void setComplete(Boolean complete) { + this.complete = complete; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 00000000000..03b5f5cd88f --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,291 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import java.lang.reflect.Type; +import javax.json.bind.annotation.JsonbTypeDeserializer; +import javax.json.bind.annotation.JsonbTypeSerializer; +import javax.json.bind.serializer.DeserializationContext; +import javax.json.bind.serializer.JsonbDeserializer; +import javax.json.bind.serializer.JsonbSerializer; +import javax.json.bind.serializer.SerializationContext; +import javax.json.stream.JsonGenerator; +import javax.json.stream.JsonParser; +import javax.json.bind.annotation.JsonbProperty; + +/** + * A pet for sale in the pet store + */ + +public class Pet { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("category") + private Category category; + + @JsonbProperty("name") + private String name; + + @JsonbProperty("photoUrls") + private List photoUrls = new ArrayList<>(); + + @JsonbProperty("tags") + private List tags = null; + + @JsonbTypeSerializer(StatusEnum.Serializer.class) + @JsonbTypeDeserializer(StatusEnum.Deserializer.class) + public enum StatusEnum { + + AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); + + + String value; + + StatusEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static final class Deserializer implements JsonbDeserializer { + @Override + public StatusEnum deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'"); + } + } + + public static final class Serializer implements JsonbSerializer { + @Override + public void serialize(StatusEnum obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value); + } + } + } + + /** + * pet status in the store + */ + @JsonbProperty("status") + private StatusEnum status; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get category + * @return category + **/ + public Category getCategory() { + return category; + } + + /** + * Set category + */ + public void setCategory(Category category) { + this.category = category; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + /** + * Set name + */ + public void setName(String name) { + this.name = name; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + public List getPhotoUrls() { + return photoUrls; + } + + /** + * Set photoUrls + */ + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new ArrayList<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + public List getTags() { + return tags; + } + + /** + * Set tags + */ + public void setTags(List tags) { + this.tags = tags; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * pet status in the store + * @return status + * @deprecated + **/ + @Deprecated + public StatusEnum getStatus() { + return status; + } + + /** + * Set status + */ + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 00000000000..5bb307506c9 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,123 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.lang.reflect.Type; +import javax.json.bind.annotation.JsonbTypeDeserializer; +import javax.json.bind.annotation.JsonbTypeSerializer; +import javax.json.bind.serializer.DeserializationContext; +import javax.json.bind.serializer.JsonbDeserializer; +import javax.json.bind.serializer.JsonbSerializer; +import javax.json.bind.serializer.SerializationContext; +import javax.json.stream.JsonGenerator; +import javax.json.stream.JsonParser; +import javax.json.bind.annotation.JsonbProperty; + +/** + * A tag for a pet + */ + +public class Tag { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("name") + private String name; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + /** + * Set name + */ + public void setName(String name) { + this.name = name; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/User.java new file mode 100644 index 00000000000..1542e3dfc58 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/model/User.java @@ -0,0 +1,276 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 java.lang.reflect.Type; +import javax.json.bind.annotation.JsonbTypeDeserializer; +import javax.json.bind.annotation.JsonbTypeSerializer; +import javax.json.bind.serializer.DeserializationContext; +import javax.json.bind.serializer.JsonbDeserializer; +import javax.json.bind.serializer.JsonbSerializer; +import javax.json.bind.serializer.SerializationContext; +import javax.json.stream.JsonGenerator; +import javax.json.stream.JsonParser; +import javax.json.bind.annotation.JsonbProperty; + +/** + * A User who is purchasing from the pet store + */ + +public class User { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("username") + private String username; + + @JsonbProperty("firstName") + private String firstName; + + @JsonbProperty("lastName") + private String lastName; + + @JsonbProperty("email") + private String email; + + @JsonbProperty("password") + private String password; + + @JsonbProperty("phone") + private String phone; + + /** + * User Status + */ + @JsonbProperty("userStatus") + private Integer userStatus; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + */ + public void setId(Long id) { + this.id = id; + } + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get username + * @return username + **/ + public String getUsername() { + return username; + } + + /** + * Set username + */ + public void setUsername(String username) { + this.username = username; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + public String getFirstName() { + return firstName; + } + + /** + * Set firstName + */ + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + public String getLastName() { + return lastName; + } + + /** + * Set lastName + */ + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get email + * @return email + **/ + public String getEmail() { + return email; + } + + /** + * Set email + */ + public void setEmail(String email) { + this.email = email; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get password + * @return password + **/ + public String getPassword() { + return password; + } + + /** + * Set password + */ + public void setPassword(String password) { + this.password = password; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get phone + * @return phone + **/ + public String getPhone() { + return phone; + } + + /** + * Set phone + */ + public void setPhone(String phone) { + this.phone = phone; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * User Status + * @return userStatus + **/ + public Integer getUserStatus() { + return userStatus; + } + + /** + * Set userStatus + */ + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).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 static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/api/PetApiTest.java new file mode 100644 index 00000000000..764ced64f49 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -0,0 +1,201 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * OpenAPI Petstore Test + * + * API tests for PetApi + */ +public class PetApiTest { + + private PetApi client; + private String baseUrl = "http://localhost:9080"; + + @BeforeEach + public void setup() throws MalformedURLException { + client = RestClientBuilder.newBuilder() + .baseUrl(new URL(baseUrl)) + .register(ApiException.class) + .build(PetApi.class); + } + + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addPetTest() { + // TODO: test validations + Pet pet = null; + //Uni response = api.addPet(pet); + //Assertions.assertNotNull(response); + + + } + + /** + * Deletes a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deletePetTest() { + // TODO: test validations + Long petId = null; + String apiKey = null; + //api.deletePet(petId, apiKey); + //Assertions.assertNotNull(response); + + + } + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void findPetsByStatusTest() { + // TODO: test validations + List status = null; + //Uni> response = api.findPetsByStatus(status); + //Assertions.assertNotNull(response); + + + } + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void findPetsByTagsTest() { + // TODO: test validations + List tags = null; + //Uni> response = api.findPetsByTags(tags); + //Assertions.assertNotNull(response); + + + } + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getPetByIdTest() { + // TODO: test validations + Long petId = null; + //Uni response = api.getPetById(petId); + //Assertions.assertNotNull(response); + + + } + + /** + * Update an existing pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updatePetTest() { + // TODO: test validations + Pet pet = null; + //Uni response = api.updatePet(pet); + //Assertions.assertNotNull(response); + + + } + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updatePetWithFormTest() { + // TODO: test validations + Long petId = null; + String name = null; + String status = null; + //api.updatePetWithForm(petId, name, status); + //Assertions.assertNotNull(response); + + + } + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileTest() { + // TODO: test validations + Long petId = null; + String additionalMetadata = null; + org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; + //Uni response = api.uploadFile(petId, additionalMetadata, _file); + //Assertions.assertNotNull(response); + + + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/api/StoreApiTest.java new file mode 100644 index 00000000000..eee457ee102 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -0,0 +1,121 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import org.openapitools.client.model.Order; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * OpenAPI Petstore Test + * + * API tests for StoreApi + */ +public class StoreApiTest { + + private StoreApi client; + private String baseUrl = "http://localhost:9080"; + + @BeforeEach + public void setup() throws MalformedURLException { + client = RestClientBuilder.newBuilder() + .baseUrl(new URL(baseUrl)) + .register(ApiException.class) + .build(StoreApi.class); + } + + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteOrderTest() { + // TODO: test validations + String orderId = null; + //api.deleteOrder(orderId); + //Assertions.assertNotNull(response); + + + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getInventoryTest() { + // TODO: test validations + //Uni> response = api.getInventory(); + //Assertions.assertNotNull(response); + + + } + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getOrderByIdTest() { + // TODO: test validations + Long orderId = null; + //Uni response = api.getOrderById(orderId); + //Assertions.assertNotNull(response); + + + } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void placeOrderTest() { + // TODO: test validations + Order order = null; + //Uni response = api.placeOrder(order); + //Assertions.assertNotNull(response); + + + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/api/UserApiTest.java new file mode 100644 index 00000000000..3721b04a5e4 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -0,0 +1,196 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.util.Date; +import org.openapitools.client.model.User; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * OpenAPI Petstore Test + * + * API tests for UserApi + */ +public class UserApiTest { + + private UserApi client; + private String baseUrl = "http://localhost:9080"; + + @BeforeEach + public void setup() throws MalformedURLException { + client = RestClientBuilder.newBuilder() + .baseUrl(new URL(baseUrl)) + .register(ApiException.class) + .build(UserApi.class); + } + + + /** + * Create user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUserTest() { + // TODO: test validations + User user = null; + //api.createUser(user); + //Assertions.assertNotNull(response); + + + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUsersWithArrayInputTest() { + // TODO: test validations + List user = null; + //api.createUsersWithArrayInput(user); + //Assertions.assertNotNull(response); + + + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUsersWithListInputTest() { + // TODO: test validations + List user = null; + //api.createUsersWithListInput(user); + //Assertions.assertNotNull(response); + + + } + + /** + * Delete user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteUserTest() { + // TODO: test validations + String username = null; + //api.deleteUser(username); + //Assertions.assertNotNull(response); + + + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getUserByNameTest() { + // TODO: test validations + String username = null; + //Uni response = api.getUserByName(username); + //Assertions.assertNotNull(response); + + + } + + /** + * Logs user into the system + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void loginUserTest() { + // TODO: test validations + String username = null; + String password = null; + //Uni response = api.loginUser(username, password); + //Assertions.assertNotNull(response); + + + } + + /** + * Logs out current logged in user session + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void logoutUserTest() { + // TODO: test validations + //api.logoutUser(); + //Assertions.assertNotNull(response); + + + } + + /** + * Updated user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateUserTest() { + // TODO: test validations + String username = null; + User user = null; + //api.updateUser(username, user); + //Assertions.assertNotNull(response); + + + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 00000000000..d0568f97766 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,50 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Category + */ +class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..ddfa78c4ac3 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -0,0 +1,58 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModelApiResponse + */ +class ModelApiResponseTest { + private final ModelApiResponse model = new ModelApiResponse(); + + /** + * Model tests for ModelApiResponse + */ + @Test + void testModelApiResponse() { + // TODO: test ModelApiResponse + } + + /** + * Test the property 'code' + */ + @Test + void codeTest() { + // TODO: test code + } + + /** + * Test the property 'type' + */ + @Test + void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + void messageTest() { + // TODO: test message + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/OrderTest.java new file mode 100644 index 00000000000..0d23109bd82 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/OrderTest.java @@ -0,0 +1,83 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Date; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Order + */ +class OrderTest { + private final Order model = new Order(); + + /** + * Model tests for Order + */ + @Test + void testOrder() { + // TODO: test Order + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'petId' + */ + @Test + void petIdTest() { + // TODO: test petId + } + + /** + * Test the property 'quantity' + */ + @Test + void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'shipDate' + */ + @Test + void shipDateTest() { + // TODO: test shipDate + } + + /** + * Test the property 'status' + */ + @Test + void statusTest() { + // TODO: test status + } + + /** + * Test the property 'complete' + */ + @Test + void completeTest() { + // TODO: test complete + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 00000000000..e939e3b1d45 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,87 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Pet + */ +class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'category' + */ + @Test + void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + + /** + * Test the property 'photoUrls' + */ + @Test + void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 00000000000..5131a8a3e88 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,50 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Tag + */ +class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/UserTest.java new file mode 100644 index 00000000000..d0d84b12705 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/test/java/org/openapitools/client/model/UserTest.java @@ -0,0 +1,98 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for User + */ +class UserTest { + private final User model = new User(); + + /** + * Model tests for User + */ + @Test + void testUser() { + // TODO: test User + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'username' + */ + @Test + void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'firstName' + */ + @Test + void firstNameTest() { + // TODO: test firstName + } + + /** + * Test the property 'lastName' + */ + @Test + void lastNameTest() { + // TODO: test lastName + } + + /** + * Test the property 'email' + */ + @Test + void emailTest() { + // TODO: test email + } + + /** + * Test the property 'password' + */ + @Test + void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'phone' + */ + @Test + void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'userStatus' + */ + @Test + void userStatusTest() { + // TODO: test userStatus + } + +} diff --git a/samples/client/petstore/java/native/build.gradle b/samples/client/petstore/java/native/build.gradle index ad4e835b770..bdc8a7c7d51 100644 --- a/samples/client/petstore/java/native/build.gradle +++ b/samples/client/petstore/java/native/build.gradle @@ -71,6 +71,7 @@ ext { beanvalidation_version = "2.0.2" junit_version = "5.10.2" httpmime_version = "4.5.13" + commons_lang3_version = "3.17.0" } dependencies { @@ -82,6 +83,7 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:0.2.1" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" implementation "org.apache.httpcomponents:httpmime:$httpmime_version" + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" } diff --git a/samples/client/petstore/java/native/pom.xml b/samples/client/petstore/java/native/pom.xml index f5aa8987b09..68923150e4b 100644 --- a/samples/client/petstore/java/native/pom.xml +++ b/samples/client/petstore/java/native/pom.xml @@ -239,6 +239,12 @@ httpmime ${httpmime-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + @@ -258,6 +264,7 @@ 1.3.5 2.0.2 4.5.14 + 3.17.0 5.10.2 2.27.2 diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 76dc10c07a8..599568bde9f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -321,21 +323,7 @@ public class AdditionalPropertiesClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && - Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty) && - equalsNullable(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.mapWithUndeclaredPropertiesAnytype1, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype1) && - Objects.equals(this.mapWithUndeclaredPropertiesAnytype2, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype2) && - Objects.equals(this.mapWithUndeclaredPropertiesAnytype3, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype3) && - Objects.equals(this.emptyMap, additionalPropertiesClass.emptyMap) && - Objects.equals(this.mapWithUndeclaredPropertiesString, additionalPropertiesClass.mapWithUndeclaredPropertiesString); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -344,7 +332,7 @@ public class AdditionalPropertiesClass { @Override public int hashCode() { - return Objects.hash(mapProperty, mapOfMapProperty, hashCodeNullable(anytype1), mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, emptyMap, mapWithUndeclaredPropertiesString); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java index d1f3c98076f..b94a0b477c5 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -116,20 +118,12 @@ public class Animal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className, color); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java index 1c61171ebe6..7254eb1a725 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class Apple { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Apple apple = (Apple) o; - return Objects.equals(this.cultivar, apple.cultivar) && - Objects.equals(this.origin, apple.origin); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(cultivar, origin); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java index a34652b3c10..c29b483efe4 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class AppleReq { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AppleReq appleReq = (AppleReq) o; - return Objects.equals(this.cultivar, appleReq.cultivar) && - Objects.equals(this.mealy, appleReq.mealy); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(cultivar, mealy); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 9028a95c7d4..b0651d33cd8 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -84,19 +86,12 @@ public class ArrayOfArrayOfNumberOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayArrayNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 03e2f228771..7d0e66aafd2 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -84,19 +86,12 @@ public class ArrayOfNumberOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java index 234361daf01..3fc422984c5 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -158,21 +160,12 @@ public class ArrayTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java index 4292c2d0ea2..14bc6540e76 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -74,19 +76,12 @@ public class Banana { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Banana banana = (Banana) o; - return Objects.equals(this.lengthCm, banana.lengthCm); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(lengthCm); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java index 6756b7f9b3c..ff1c944f98c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -103,20 +105,12 @@ public class BananaReq { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BananaReq bananaReq = (BananaReq) o; - return Objects.equals(this.lengthCm, bananaReq.lengthCm) && - Objects.equals(this.sweet, bananaReq.sweet); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(lengthCm, sweet); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java index 4828c1cae62..c804078eac4 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class BasquePig { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BasquePig basquePig = (BasquePig) o; - return Objects.equals(this.className, basquePig.className); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java index 99cbc682ed7..2b9119c0a4c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -218,24 +220,12 @@ public class Capitalization { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java index 591afb1f7d7..6da0a51b54b 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -97,20 +99,12 @@ public class Cat extends Animal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(declawed, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java index 7a2120d0b06..5b53763e2a6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class Category { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java index 160a533e97c..47942a2433d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -127,21 +129,12 @@ public class ChildCat extends ParentPet { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildCat childCat = (ChildCat) o; - return Objects.equals(this.name, childCat.name) && - Objects.equals(this.petType, childCat.petType) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, petType, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java index 46bf4f851a9..0abcb8d23a7 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class ClassModel { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(propertyClass); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java index 2228e599891..ea82a13388c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class Client { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(client); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index c48a15a03b8..864b050daa1 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class ComplexQuadrilateral { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ComplexQuadrilateral complexQuadrilateral = (ComplexQuadrilateral) o; - return Objects.equals(this.shapeType, complexQuadrilateral.shapeType) && - Objects.equals(this.quadrilateralType, complexQuadrilateral.quadrilateralType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, quadrilateralType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java index 8051e05c23b..680b504a37d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class DanishPig { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DanishPig danishPig = (DanishPig) o; - return Objects.equals(this.className, danishPig.className); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 7a17c8f3d89..b1ad430e058 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -75,19 +77,12 @@ public class DeprecatedObject { */ @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); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java index d03f6a1dda8..6a4a47b3aee 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -96,20 +98,12 @@ public class Dog extends Animal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(breed, super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java index d259ea563f8..ae3fe085966 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -234,19 +236,7 @@ public class Drawing extends HashMap { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Drawing drawing = (Drawing) o; - return Objects.equals(this.mainShape, drawing.mainShape) && - Objects.equals(this.shapeOrNull, drawing.shapeOrNull) && - equalsNullable(this.nullableShape, drawing.nullableShape) && - Objects.equals(this.shapes, drawing.shapes)&& - Objects.equals(this.additionalProperties, drawing.additionalProperties) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -255,7 +245,7 @@ public class Drawing extends HashMap { @Override public int hashCode() { - return Objects.hash(mainShape, shapeOrNull, hashCodeNullable(nullableShape), shapes, super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java index 91d031f2d38..c8be0bc0154 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -182,20 +184,12 @@ public class EnumArrays { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumClass.java index 456228e0398..799cc43f029 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java index a5b629557a1..84c1f7dbef6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -499,22 +501,7 @@ public class EnumTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumIntegerOnly, enumTest.enumIntegerOnly) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - equalsNullable(this.outerEnum, enumTest.outerEnum) && - Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && - Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && - Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -523,7 +510,7 @@ public class EnumTest { @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumIntegerOnly, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 2033162fd12..e995ec26a55 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class EquilateralTriangle { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EquilateralTriangle equilateralTriangle = (EquilateralTriangle) o; - return Objects.equals(this.shapeType, equilateralTriangle.shapeType) && - Objects.equals(this.triangleType, equilateralTriangle.triangleType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 24888be137f..56df082222e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -113,20 +115,12 @@ public class FakeBigDecimalMap200Response { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FakeBigDecimalMap200Response fakeBigDecimalMap200Response = (FakeBigDecimalMap200Response) o; - return Objects.equals(this.someId, fakeBigDecimalMap200Response.someId) && - Objects.equals(this.someMap, fakeBigDecimalMap200Response.someMap); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(someId, someMap); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 5a0e4037072..5bd7e5480dd 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -113,20 +115,12 @@ public class FileSchemaTestClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this._file, fileSchemaTestClass._file) && - Objects.equals(this.files, fileSchemaTestClass.files); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_file, files); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java index baf2ad20197..f626dd429df 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class Foo { */ @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); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index 63ff6395a1e..77541ddac03 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -74,19 +76,12 @@ public class FooGetDefaultResponse { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; - return Objects.equals(this.string, fooGetDefaultResponse.string); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(string); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java index 3bb358c894a..06081ade5c9 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -523,34 +525,12 @@ public class FormatTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - 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) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && - Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Fruit.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Fruit.java index 657dfc19c85..7076e9cfc82 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Fruit.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Fruit.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FruitReq.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FruitReq.java index 66a63ec9eb0..25351890057 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FruitReq.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FruitReq.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GmFruit.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GmFruit.java index 6b3ba6739e3..5d32e650276 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GmFruit.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GmFruit.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index 4d5c1dcadf0..d7861e6bc4e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -87,19 +89,12 @@ public class GrandparentAnimal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GrandparentAnimal grandparentAnimal = (GrandparentAnimal) o; - return Objects.equals(this.petType, grandparentAnimal.petType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(petType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 26ce80f3fc9..36059dcb94f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -92,20 +94,12 @@ public class HasOnlyReadOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar, foo); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 128a16915fb..dc73ce1cd16 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -84,14 +86,7 @@ public class HealthCheckResult { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HealthCheckResult healthCheckResult = (HealthCheckResult) o; - return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -100,7 +95,7 @@ public class HealthCheckResult { @Override public int hashCode() { - return Objects.hash(hashCodeNullable(nullableMessage)); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java index 640a0091b9a..2ce076ed6eb 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class IsoscelesTriangle { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IsoscelesTriangle isoscelesTriangle = (IsoscelesTriangle) o; - return Objects.equals(this.shapeType, isoscelesTriangle.shapeType) && - Objects.equals(this.triangleType, isoscelesTriangle.triangleType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Mammal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Mammal.java index 727d75d5809..903b59b8f06 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Mammal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Mammal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java index e8ab4903c9f..199a4599163 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -229,22 +231,12 @@ public class MapTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9b8ea43fb25..58b3b554af2 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -144,21 +146,12 @@ public class MixedPropertiesAndAdditionalPropertiesClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(uuid, dateTime, map); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java index a587abd842b..71fac698fae 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class Model200Response { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, propertyClass); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java index f1a305ac813..b5972d9c1c3 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -131,21 +133,12 @@ public class ModelApiResponse { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(code, type, message); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java index 2cbb873e1bb..833706d3875 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class ModelFile { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(sourceURI); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java index 688bd3a492b..3267f84f60a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class ModelList { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_123list); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java index 8afe2aa291c..3e40db3fbfa 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class ModelReturn { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_return); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java index 254eb93783d..038ad7859f9 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -150,22 +152,12 @@ public class Name { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java index 9cc1aec009d..00551c47819 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -584,27 +586,7 @@ public class NullableClass extends HashMap { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NullableClass nullableClass = (NullableClass) o; - return equalsNullable(this.integerProp, nullableClass.integerProp) && - equalsNullable(this.numberProp, nullableClass.numberProp) && - equalsNullable(this.booleanProp, nullableClass.booleanProp) && - equalsNullable(this.stringProp, nullableClass.stringProp) && - equalsNullable(this.dateProp, nullableClass.dateProp) && - equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && - equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && - equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && - Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && - equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && - equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && - Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable)&& - Objects.equals(this.additionalProperties, nullableClass.additionalProperties) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -613,7 +595,7 @@ public class NullableClass extends HashMap { @Override public int hashCode() { - return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableShape.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableShape.java index 69337631f59..1010877832f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableShape.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableShape.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java index 311bddd0737..ee0cbaa9b28 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -74,19 +76,12 @@ public class NumberOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(justNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 9f22ac33b40..9a22c13d20b 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -178,22 +180,12 @@ public class ObjectWithDeprecatedFields { */ @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); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(uuid, id, deprecatedRef, bars); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java index 3ba6eeb6d87..93c7ad4b17b 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -256,24 +258,12 @@ public class Order { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java index da51395e38f..e5f001062f0 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -132,21 +134,12 @@ public class OuterComposite { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnum.java index 8a5b13cb19c..27626a28cd0 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java index 284de643c1a..f4fa162b035 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumInteger.java index ac32ba44007..9e3ec295345 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumInteger.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java index 356b2635800..f3cdf262a27 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java index 93528aa7d7d..9d4b9e660b4 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -64,18 +66,12 @@ public class ParentPet extends GrandparentAnimal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java index d5b671856b5..ae945f391b6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -275,24 +277,12 @@ public class Pet { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Pet pet = (Pet) o; - return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && - Objects.equals(this.name, pet.name) && - Objects.equals(this.photoUrls, pet.photoUrls) && - Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pig.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pig.java index 4ee5c3fc43c..ff075735ed6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pig.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pig.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Quadrilateral.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Quadrilateral.java index b2a851b351f..754046b4c83 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Quadrilateral.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Quadrilateral.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index ca89b2c6f14..3b14b5e07bf 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class QuadrilateralInterface { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuadrilateralInterface quadrilateralInterface = (QuadrilateralInterface) o; - return Objects.equals(this.quadrilateralType, quadrilateralInterface.quadrilateralType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(quadrilateralType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index c3c0fff1d5c..4c02d91cfb2 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -100,20 +102,12 @@ public class ReadOnlyFirst { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar, baz); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index d72f51aecf7..505a2129d34 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class ScaleneTriangle { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ScaleneTriangle scaleneTriangle = (ScaleneTriangle) o; - return Objects.equals(this.shapeType, scaleneTriangle.shapeType) && - Objects.equals(this.triangleType, scaleneTriangle.triangleType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Shape.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Shape.java index 6a44b5a721e..b16d6bc4917 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Shape.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Shape.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java index 41fcfc60069..75d01e3b738 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -73,19 +75,12 @@ public class ShapeInterface { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ShapeInterface shapeInterface = (ShapeInterface) o; - return Objects.equals(this.shapeType, shapeInterface.shapeType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeOrNull.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeOrNull.java index 07f9a1bd3aa..bab94a62534 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeOrNull.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeOrNull.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index 98b7071d41f..782aa3c8dfb 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class SimpleQuadrilateral { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SimpleQuadrilateral simpleQuadrilateral = (SimpleQuadrilateral) o; - return Objects.equals(this.shapeType, simpleQuadrilateral.shapeType) && - Objects.equals(this.quadrilateralType, simpleQuadrilateral.quadrilateralType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, quadrilateralType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java index 12a839c0a15..8f7abe06d9e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class SpecialModelName { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName) && - Objects.equals(this.specialModelName, specialModelName.specialModelName); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash($specialPropertyName, specialModelName); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java index 5f7135324b9..83c49d2caa0 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -102,20 +104,12 @@ public class Tag { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 0fd01ccbd17..ed333dcabd4 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -122,21 +124,12 @@ public class TestInlineFreeformAdditionalPropertiesRequest extends HashMap boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -444,7 +428,7 @@ public class User { @Override public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus, objectWithNoDeclaredProps, hashCodeNullable(objectWithNoDeclaredPropsNullable), hashCodeNullable(anyTypeProp), hashCodeNullable(anyTypePropNullable)); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java index be60877fab8..7d49c88d862 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.StringJoiner; @@ -131,21 +133,12 @@ public class Whale { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Whale whale = (Whale) o; - return Objects.equals(this.hasBaleen, whale.hasBaleen) && - Objects.equals(this.hasTeeth, whale.hasTeeth) && - Objects.equals(this.className, whale.className); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(hasBaleen, hasTeeth, className); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java index 9e1fbf95636..fbd174fee92 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -188,22 +190,12 @@ public class Zebra extends HashMap { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Zebra zebra = (Zebra) o; - return Objects.equals(this.type, zebra.type) && - Objects.equals(this.className, zebra.className)&& - Objects.equals(this.additionalProperties, zebra.additionalProperties) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(type, className, super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/client/petstore/java/okhttp-gson-3.1/build.gradle b/samples/client/petstore/java/okhttp-gson-3.1/build.gradle index f2a6e8e06eb..3481d0b7c6f 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-3.1/build.gradle @@ -115,7 +115,7 @@ dependencies { implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/petstore/java/okhttp-gson-3.1/build.sbt b/samples/client/petstore/java/okhttp-gson-3.1/build.sbt index fc99baef382..a4ec728212a 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-3.1/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", diff --git a/samples/client/petstore/java/okhttp-gson-3.1/pom.xml b/samples/client/petstore/java/okhttp-gson-3.1/pom.xml index f35785a5ecf..2834afabd93 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-3.1/pom.xml @@ -331,7 +331,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/build.gradle b/samples/client/petstore/java/okhttp-gson-awsv4signature/build.gradle index 9efe9b9f0a0..96bee6a6a58 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/build.gradle @@ -116,7 +116,7 @@ dependencies { implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation 'software.amazon.awssdk:auth:2.20.157' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/build.sbt b/samples/client/petstore/java/okhttp-gson-awsv4signature/build.sbt index 993651032ca..ca9e4704639 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "software.amazon.awssdk" % "auth" % "2.20.157", diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/pom.xml b/samples/client/petstore/java/okhttp-gson-awsv4signature/pom.xml index 4d1adf440d5..fcca932920a 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/pom.xml @@ -336,7 +336,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle index df040d5aac1..ff5a6701b9e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle @@ -115,7 +115,7 @@ dependencies { implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.30' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt index fe2edb8e3f1..35c2e615d1f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml index 093370ee323..922ba2a9ba6 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml @@ -336,7 +336,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/build.gradle b/samples/client/petstore/java/okhttp-gson-group-parameter/build.gradle index 23a62038557..07ac6648265 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/build.gradle @@ -115,7 +115,7 @@ dependencies { implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/build.sbt b/samples/client/petstore/java/okhttp-gson-group-parameter/build.sbt index 824632fc662..baea7b60bf0 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/pom.xml b/samples/client/petstore/java/okhttp-gson-group-parameter/pom.xml index ad5944f7571..a3cb5d2afac 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/pom.xml @@ -331,7 +331,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/build.gradle b/samples/client/petstore/java/okhttp-gson-nullable-required/build.gradle index d52a031af35..add44e0ec5f 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/build.gradle @@ -115,7 +115,7 @@ dependencies { implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/build.sbt b/samples/client/petstore/java/okhttp-gson-nullable-required/build.sbt index f0b139580df..cd615f72411 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/pom.xml b/samples/client/petstore/java/okhttp-gson-nullable-required/pom.xml index ea83c53acf8..7a2c9e5acd8 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/pom.xml @@ -331,7 +331,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle index 51ba39863b4..aa345bbc8a9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle @@ -115,7 +115,7 @@ dependencies { implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt index f93a3516af9..4af66177f32 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml index 8f24c134707..bb09a11bde8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml @@ -338,7 +338,7 @@ 1.9.0 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/build.gradle b/samples/client/petstore/java/okhttp-gson-swagger1/build.gradle index 5ce050edbdd..bfee284c1c6 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-swagger1/build.gradle @@ -115,7 +115,7 @@ dependencies { implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/build.sbt b/samples/client/petstore/java/okhttp-gson-swagger1/build.sbt index ce7b54dda96..ce1336dd084 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-swagger1/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/pom.xml b/samples/client/petstore/java/okhttp-gson-swagger1/pom.xml index e7d136d699c..938900a24d6 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-swagger1/pom.xml @@ -337,7 +337,7 @@ 1.6.6 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/build.gradle b/samples/client/petstore/java/okhttp-gson-swagger2/build.gradle index 5ce050edbdd..bfee284c1c6 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-swagger2/build.gradle @@ -115,7 +115,7 @@ dependencies { implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/build.sbt b/samples/client/petstore/java/okhttp-gson-swagger2/build.sbt index ce7b54dda96..ce1336dd084 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-swagger2/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/pom.xml b/samples/client/petstore/java/okhttp-gson-swagger2/pom.xml index 5cab5823b79..fda28b6c313 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-swagger2/pom.xml @@ -337,7 +337,7 @@ 2.2.15 4.12.0 2.10.1 - 3.14.0 + 3.17.0 0.2.6 1.3.5 2.0.2 diff --git a/samples/client/petstore/java/okhttp-gson/build.gradle b/samples/client/petstore/java/okhttp-gson/build.gradle index 5ce050edbdd..bfee284c1c6 100644 --- a/samples/client/petstore/java/okhttp-gson/build.gradle +++ b/samples/client/petstore/java/okhttp-gson/build.gradle @@ -115,7 +115,7 @@ dependencies { implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/samples/client/petstore/java/okhttp-gson/build.sbt b/samples/client/petstore/java/okhttp-gson/build.sbt index ce7b54dda96..ce1336dd084 100644 --- a/samples/client/petstore/java/okhttp-gson/build.sbt +++ b/samples/client/petstore/java/okhttp-gson/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml index 8b36afad0dc..f7ec28d1f38 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml @@ -318,6 +318,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml index e9b2b57c298..35512ac069d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml @@ -318,6 +318,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/pom.xml b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/pom.xml index 61c396d8d9c..c5d9ade43f1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/pom.xml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/pom.xml @@ -328,6 +328,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/pom.xml b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/pom.xml index 193a5d6846a..59ace0a8a94 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/pom.xml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/pom.xml @@ -328,6 +328,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle b/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle index e395c9d2d6f..da665aa1077 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle +++ b/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle @@ -107,6 +107,7 @@ ext { junit_version = "5.8.2" scribejava_apis_version = "8.3.1" tomitribe_http_signatures_version = "1.7" + commons_lang3_version = "3.17.0" } dependencies { @@ -125,6 +126,7 @@ dependencies { implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt b/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt index 73d21d4824b..873fe19c3f1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt +++ b/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt @@ -24,6 +24,7 @@ lazy val root = (project in file(".")). "com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile", "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml b/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml index a927083dc55..49f0c29b060 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml @@ -328,6 +328,13 @@ jersey-apache-connector ${jersey-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + org.junit.jupiter @@ -347,6 +354,7 @@ 5.10.0 1.8 8.3.3 + 3.17.0 2.21.0 diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 43745cdf21a..4bfe6ff4da7 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -326,21 +328,7 @@ public class AdditionalPropertiesClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && - Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty) && - equalsNullable(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.mapWithUndeclaredPropertiesAnytype1, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype1) && - Objects.equals(this.mapWithUndeclaredPropertiesAnytype2, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype2) && - Objects.equals(this.mapWithUndeclaredPropertiesAnytype3, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype3) && - Objects.equals(this.emptyMap, additionalPropertiesClass.emptyMap) && - Objects.equals(this.mapWithUndeclaredPropertiesString, additionalPropertiesClass.mapWithUndeclaredPropertiesString); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -349,7 +337,7 @@ public class AdditionalPropertiesClass { @Override public int hashCode() { - return Objects.hash(mapProperty, mapOfMapProperty, hashCodeNullable(anytype1), mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, emptyMap, mapWithUndeclaredPropertiesString); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java index 4d2ce0fec2e..7f217ced6c5 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -114,20 +116,12 @@ public class Animal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className, color); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Apple.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Apple.java index e53e2e86c5d..a486705a439 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Apple.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -102,20 +104,12 @@ public class Apple { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Apple apple = (Apple) o; - return Objects.equals(this.cultivar, apple.cultivar) && - Objects.equals(this.origin, apple.origin); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(cultivar, origin); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AppleReq.java index 8557a52e994..8ed48f4669f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AppleReq.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AppleReq.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -102,20 +104,12 @@ public class AppleReq { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AppleReq appleReq = (AppleReq) o; - return Objects.equals(this.cultivar, appleReq.cultivar) && - Objects.equals(this.mealy, appleReq.mealy); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(cultivar, mealy); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 5510fb44e7c..6e6180d6ad5 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -82,19 +84,12 @@ public class ArrayOfArrayOfNumberOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayArrayNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 2d594551dab..c0ad5cab87b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -82,19 +84,12 @@ public class ArrayOfNumberOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java index 3ae301ac9bf..47a40e04000 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -158,21 +160,12 @@ public class ArrayTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Banana.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Banana.java index 18a084d1c4b..625476f4576 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Banana.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -73,19 +75,12 @@ public class Banana { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Banana banana = (Banana) o; - return Objects.equals(this.lengthCm, banana.lengthCm); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(lengthCm); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BananaReq.java index ba41a747493..eaa8b4b9371 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BananaReq.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BananaReq.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -103,20 +105,12 @@ public class BananaReq { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BananaReq bananaReq = (BananaReq) o; - return Objects.equals(this.lengthCm, bananaReq.lengthCm) && - Objects.equals(this.sweet, bananaReq.sweet); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(lengthCm, sweet); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BasquePig.java index 4bb12b97ab8..82a748fa33e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BasquePig.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -71,19 +73,12 @@ public class BasquePig { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BasquePig basquePig = (BasquePig) o; - return Objects.equals(this.className, basquePig.className); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java index 856400a49ec..d6b92caf871 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -221,24 +223,12 @@ public class Capitalization { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java index 5db8352f8ae..ff2be18a7ad 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -123,21 +125,12 @@ public class Cat extends Animal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed)&& - Objects.equals(this.additionalProperties, cat.additionalProperties) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(declawed, super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java index 12f9b4571b2..edb04e1a860 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -101,20 +103,12 @@ public class Category { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java index 7aacf45411a..3119866d368 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -166,22 +168,12 @@ public class ChildCat extends ParentPet { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildCat childCat = (ChildCat) o; - return Objects.equals(this.name, childCat.name) && - Objects.equals(this.petType, childCat.petType)&& - Objects.equals(this.additionalProperties, childCat.additionalProperties) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, petType, super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java index 8b5ec06c54d..f6215ad8191 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -71,19 +73,12 @@ public class ClassModel { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(propertyClass); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java index f52ad3cd1b1..1d31c4719e0 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -71,19 +73,12 @@ public class Client { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(client); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index dd3e26115b5..6f686332089 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -142,21 +144,12 @@ public class ComplexQuadrilateral { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ComplexQuadrilateral complexQuadrilateral = (ComplexQuadrilateral) o; - return Objects.equals(this.shapeType, complexQuadrilateral.shapeType) && - Objects.equals(this.quadrilateralType, complexQuadrilateral.quadrilateralType)&& - Objects.equals(this.additionalProperties, complexQuadrilateral.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, quadrilateralType, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DanishPig.java index 53b4fe023d8..bfde542aac8 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DanishPig.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -71,19 +73,12 @@ public class DanishPig { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DanishPig danishPig = (DanishPig) o; - return Objects.equals(this.className, danishPig.className); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(className); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 2551abc904d..cd12c623651 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -73,19 +75,12 @@ public class DeprecatedObject { */ @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); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java index e99cab89178..e4d588a739c 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -122,21 +124,12 @@ public class Dog extends Animal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed)&& - Objects.equals(this.additionalProperties, dog.additionalProperties) && - super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(breed, super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Drawing.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Drawing.java index aa41efe595f..e0f7f2d6775 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Drawing.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -234,18 +236,7 @@ public class Drawing { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Drawing drawing = (Drawing) o; - return Objects.equals(this.mainShape, drawing.mainShape) && - equalsNullable(this.shapeOrNull, drawing.shapeOrNull) && - equalsNullable(this.nullableShape, drawing.nullableShape) && - Objects.equals(this.shapes, drawing.shapes)&& - Objects.equals(this.additionalProperties, drawing.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -254,7 +245,7 @@ public class Drawing { @Override public int hashCode() { - return Objects.hash(mainShape, hashCodeNullable(shapeOrNull), hashCodeNullable(nullableShape), shapes, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java index 6238af12763..6702d2f7275 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -181,20 +183,12 @@ public class EnumArrays { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumClass.java index 0150ebe31b4..4f09e72dbe2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java index 59c58ab91eb..2cf366f2620 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -506,22 +508,7 @@ public class EnumTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumIntegerOnly, enumTest.enumIntegerOnly) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - equalsNullable(this.outerEnum, enumTest.outerEnum) && - Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && - Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && - Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -530,7 +517,7 @@ public class EnumTest { @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumIntegerOnly, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 1c31a6c15b7..e99102bea3a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -142,21 +144,12 @@ public class EquilateralTriangle { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EquilateralTriangle equilateralTriangle = (EquilateralTriangle) o; - return Objects.equals(this.shapeType, equilateralTriangle.shapeType) && - Objects.equals(this.triangleType, equilateralTriangle.triangleType)&& - Objects.equals(this.additionalProperties, equilateralTriangle.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 170ad2b8b49..8ecdae1cb26 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -112,20 +114,12 @@ public class FileSchemaTestClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this._file, fileSchemaTestClass._file) && - Objects.equals(this.files, fileSchemaTestClass.files); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_file, files); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Foo.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Foo.java index c3d7e4aa3d8..6f4e938ed9a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Foo.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -71,19 +73,12 @@ public class Foo { */ @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); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index 986bb8b5d00..d02039382f2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -73,19 +75,12 @@ public class FooGetDefaultResponse { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; - return Objects.equals(this.string, fooGetDefaultResponse.string); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(string); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java index a51743669e2..078dea2c5b6 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -537,34 +539,12 @@ public class FormatTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - 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) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && - Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Fruit.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Fruit.java index e0063f25c61..9fbfd53e52f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Fruit.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Fruit.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FruitReq.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FruitReq.java index 528c23fefd3..52ba66ff126 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FruitReq.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FruitReq.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GmFruit.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GmFruit.java index d2e59719e3b..38aa06694ca 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GmFruit.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GmFruit.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index 4512e112c8d..73270e37e9a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -84,19 +86,12 @@ public class GrandparentAnimal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GrandparentAnimal grandparentAnimal = (GrandparentAnimal) o; - return Objects.equals(this.petType, grandparentAnimal.petType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(petType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 10721debfd1..c5d036e8ee7 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -92,20 +94,12 @@ public class HasOnlyReadOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar, foo); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 547f0d1bc84..bc9625b44e9 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -82,14 +84,7 @@ public class HealthCheckResult { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HealthCheckResult healthCheckResult = (HealthCheckResult) o; - return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -98,7 +93,7 @@ public class HealthCheckResult { @Override public int hashCode() { - return Objects.hash(hashCodeNullable(nullableMessage)); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java index 741c289a890..cccace584b0 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -101,20 +103,12 @@ public class IsoscelesTriangle { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IsoscelesTriangle isoscelesTriangle = (IsoscelesTriangle) o; - return Objects.equals(this.shapeType, isoscelesTriangle.shapeType) && - Objects.equals(this.triangleType, isoscelesTriangle.triangleType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Mammal.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Mammal.java index 7b007cb213a..6d1c1769c6c 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Mammal.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Mammal.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MammalAnyof.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MammalAnyof.java index 42b10eb69ad..708b89790b3 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MammalAnyof.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MammalAnyof.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java index dffb29de558..141884a7f7e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -230,22 +232,12 @@ public class MapTest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 0cdae9a6d43..f84af4b6aa9 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -144,21 +146,12 @@ public class MixedPropertiesAndAdditionalPropertiesClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(uuid, dateTime, map); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java index 35c20d8ca6a..cf03abcff2f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -102,20 +104,12 @@ public class Model200Response { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, propertyClass); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 15a4a419b28..8ffcda98879 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -132,21 +134,12 @@ public class ModelApiResponse { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(code, type, message); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelFile.java index b9a89f3a17e..2a9a907e327 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelFile.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -72,19 +74,12 @@ public class ModelFile { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(sourceURI); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelList.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelList.java index 1b91713f445..eeedd9dd4ba 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelList.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -72,19 +74,12 @@ public class ModelList { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_123list); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java index 96d2ac44fe7..b3b8b7d9d1b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -72,19 +74,12 @@ public class ModelReturn { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(_return); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java index 56f543a8e55..7c709b7b437 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -151,22 +153,12 @@ public class Name { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableClass.java index f5617df6884..443983c9fdb 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableClass.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -587,26 +589,7 @@ public class NullableClass { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NullableClass nullableClass = (NullableClass) o; - return equalsNullable(this.integerProp, nullableClass.integerProp) && - equalsNullable(this.numberProp, nullableClass.numberProp) && - equalsNullable(this.booleanProp, nullableClass.booleanProp) && - equalsNullable(this.stringProp, nullableClass.stringProp) && - equalsNullable(this.dateProp, nullableClass.dateProp) && - equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && - equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && - equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && - Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && - equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && - equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && - Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable)&& - Objects.equals(this.additionalProperties, nullableClass.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -615,7 +598,7 @@ public class NullableClass { @Override public int hashCode() { - return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableShape.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableShape.java index f948d1e5e50..bec64556a9b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableShape.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableShape.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java index 4a496bd97f4..31fe4214747 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -72,19 +74,12 @@ public class NumberOnly { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(justNumber); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index e6c33ef2e1d..de28645a687 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -188,22 +190,12 @@ public class ObjectWithDeprecatedFields { */ @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); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(uuid, id, deprecatedRef, bars); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java index 6193d72decd..9902b3c466d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -259,24 +261,12 @@ public class Order { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java index 26773fbe640..70a43c2a0c8 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -132,21 +134,12 @@ public class OuterComposite { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnum.java index d50018b999d..608bb2c9689 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java index 73020e1e3b8..25b3940b749 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumInteger.java index a83925c5869..c3072f8a0ae 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumInteger.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java index 383ca422742..0d894f96178 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ParentPet.java index 7e9f542d0c0..a5d08c1d752 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ParentPet.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -95,18 +97,12 @@ public class ParentPet extends GrandparentAnimal { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(super.hashCode(), additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java index 1a2bbc67b03..914785f4050 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -278,24 +280,12 @@ public class Pet { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Pet pet = (Pet) o; - return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && - Objects.equals(this.name, pet.name) && - Objects.equals(this.photoUrls, pet.photoUrls) && - Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pig.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pig.java index ed0f54318a1..9ead76fb3db 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pig.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pig.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Quadrilateral.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Quadrilateral.java index 77292331867..4c057de9547 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Quadrilateral.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Quadrilateral.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index 7d2f4602c43..179430a039a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -71,19 +73,12 @@ public class QuadrilateralInterface { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuadrilateralInterface quadrilateralInterface = (QuadrilateralInterface) o; - return Objects.equals(this.quadrilateralType, quadrilateralInterface.quadrilateralType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(quadrilateralType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 1900fe83eed..63e9d3c7681 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -99,20 +101,12 @@ public class ReadOnlyFirst { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(bar, baz); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index 757ca96e161..fff63ed6fc2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -142,21 +144,12 @@ public class ScaleneTriangle { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ScaleneTriangle scaleneTriangle = (ScaleneTriangle) o; - return Objects.equals(this.shapeType, scaleneTriangle.shapeType) && - Objects.equals(this.triangleType, scaleneTriangle.triangleType)&& - Objects.equals(this.additionalProperties, scaleneTriangle.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Shape.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Shape.java index 001b0b8e4b2..574712cbd16 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Shape.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Shape.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeInterface.java index 1ca563f3048..e8fe2c342ba 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -71,19 +73,12 @@ public class ShapeInterface { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ShapeInterface shapeInterface = (ShapeInterface) o; - return Objects.equals(this.shapeType, shapeInterface.shapeType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeOrNull.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeOrNull.java index a9e0c8e3e7d..ab031659017 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeOrNull.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeOrNull.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index 9b4b85607a6..9a8798ee37e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -142,21 +144,12 @@ public class SimpleQuadrilateral { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SimpleQuadrilateral simpleQuadrilateral = (SimpleQuadrilateral) o; - return Objects.equals(this.shapeType, simpleQuadrilateral.shapeType) && - Objects.equals(this.quadrilateralType, simpleQuadrilateral.quadrilateralType)&& - Objects.equals(this.additionalProperties, simpleQuadrilateral.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(shapeType, quadrilateralType, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java index d2ee2257b9c..a938622d429 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -102,20 +104,12 @@ public class SpecialModelName { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName) && - Objects.equals(this.specialModelName, specialModelName.specialModelName); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash($specialPropertyName, specialModelName); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java index ebad74cb005..f75d60741ba 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -101,20 +103,12 @@ public class Tag { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(id, name); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 2fed072b1e7..08c15e10f2a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -113,20 +115,12 @@ public class TestInlineFreeformAdditionalPropertiesRequest { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = (TestInlineFreeformAdditionalPropertiesRequest) o; - return Objects.equals(this.someProperty, testInlineFreeformAdditionalPropertiesRequest.someProperty)&& - Objects.equals(this.additionalProperties, testInlineFreeformAdditionalPropertiesRequest.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(someProperty, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Triangle.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Triangle.java index d073c8a5133..4620db38bb0 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Triangle.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Triangle.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TriangleInterface.java index b736e78ae30..309a695e57e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -71,19 +73,12 @@ public class TriangleInterface { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TriangleInterface triangleInterface = (TriangleInterface) o; - return Objects.equals(this.triangleType, triangleInterface.triangleType); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(triangleType); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java index 2a11183ef57..966580fac00 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -426,25 +428,7 @@ public class User { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.id, user.id) && - Objects.equals(this.username, user.username) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.email, user.email) && - Objects.equals(this.password, user.password) && - Objects.equals(this.phone, user.phone) && - Objects.equals(this.userStatus, user.userStatus) && - Objects.equals(this.objectWithNoDeclaredProps, user.objectWithNoDeclaredProps) && - equalsNullable(this.objectWithNoDeclaredPropsNullable, user.objectWithNoDeclaredPropsNullable) && - equalsNullable(this.anyTypeProp, user.anyTypeProp) && - equalsNullable(this.anyTypePropNullable, user.anyTypePropNullable); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -453,7 +437,7 @@ public class User { @Override public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus, objectWithNoDeclaredProps, hashCodeNullable(objectWithNoDeclaredPropsNullable), hashCodeNullable(anyTypeProp), hashCodeNullable(anyTypePropNullable)); + return HashCodeBuilder.reflectionHashCode(this); } private static int hashCodeNullable(JsonNullable a) { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Whale.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Whale.java index 19204742743..cde2b928c0e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Whale.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Objects; import java.util.Map; import java.util.HashMap; @@ -132,21 +134,12 @@ public class Whale { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Whale whale = (Whale) o; - return Objects.equals(this.hasBaleen, whale.hasBaleen) && - Objects.equals(this.hasTeeth, whale.hasTeeth) && - Objects.equals(this.className, whale.className); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(hasBaleen, hasTeeth, className); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Zebra.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Zebra.java index f408a6fac66..aa0cfeb4457 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Zebra.java @@ -13,6 +13,8 @@ package org.openapitools.client.model; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import java.util.Map; import java.util.HashMap; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -180,21 +182,12 @@ public class Zebra { */ @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Zebra zebra = (Zebra) o; - return Objects.equals(this.type, zebra.type) && - Objects.equals(this.className, zebra.className)&& - Objects.equals(this.additionalProperties, zebra.additionalProperties); + return EqualsBuilder.reflectionEquals(this, o, false, null, true); } @Override public int hashCode() { - return Objects.hash(type, className, additionalProperties); + return HashCodeBuilder.reflectionHashCode(this); } @Override diff --git a/samples/server/petstore/java-microprofile/pom.xml b/samples/server/petstore/java-microprofile/pom.xml index 5b215a1c4f1..1182edad8eb 100644 --- a/samples/server/petstore/java-microprofile/pom.xml +++ b/samples/server/petstore/java-microprofile/pom.xml @@ -171,6 +171,6 @@ 1.1.0 2.6 1.9.1 - 1.2.0 + 1.10.0