Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JAVA] Add missing dependencies in templates #20075

Merged
merged 6 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/workflows/samples-java-client-jdk11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,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
Expand Down
6 changes: 4 additions & 2 deletions bin/configs/java-feign-no-nullable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 2 additions & 1 deletion bin/configs/java-jersey2-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
failOnUnknownProperties: true
useReflectionEqualsHashCode: true
3 changes: 2 additions & 1 deletion bin/configs/java-jersey3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
failOnUnknownProperties: true
useReflectionEqualsHashCode: true
10 changes: 10 additions & 0 deletions bin/configs/java-microprofile-rest-client-3.0-mutiny.yaml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions bin/configs/java-microprofile-rest-client-mutiny.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions bin/configs/java-native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ additionalProperties:
artifactId: petstore-native
hideGenerationTimestamp: "true"
generateBuilders: true
useReflectionEqualsHashCode: "true"
5 changes: 3 additions & 2 deletions bin/configs/java-okhttp-gson.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,14 @@
<scope>provided</scope>
</dependency>
{{/useBeanValidation}}
{{#useReflectionEqualsHashCode}}
<!-- For equals and hashCode using reflection -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3-version}</version>
</dependency>
{{/useReflectionEqualsHashCode}}

<!-- test dependencies -->
<dependency>
Expand Down Expand Up @@ -409,6 +417,9 @@
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
<beanvalidation-version>2.0.2</beanvalidation-version>
{{/useJakartaEe}}
{{#useReflectionEqualsHashCode}}
<commons-lang3-version>3.17.0</commons-lang3-version>
{{/useReflectionEqualsHashCode}}
<junit-version>5.10.0</junit-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<scribejava-version>8.3.3</scribejava-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ ext {
{{#hasHttpSignatureMethods}}
tomitribe_http_signatures_version = "1.7"
{{/hasHttpSignatureMethods}}
{{#useReflectionEqualsHashCode}}
commons_lang3_version = "3.17.0"
{{/useReflectionEqualsHashCode}}
}

dependencies {
Expand Down Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,15 @@
<artifactId>jersey-apache-connector</artifactId>
<version>${jersey-version}</version>
</dependency>
{{#useReflectionEqualsHashCode}}
<!-- For equals and hashCode using reflection -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3-version}</version>
</dependency>
{{/useReflectionEqualsHashCode}}

<!-- test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down Expand Up @@ -414,6 +423,9 @@
{{#hasOAuthMethods}}
<scribejava-apis-version>8.3.3</scribejava-apis-version>
{{/hasOAuthMethods}}
{{#useReflectionEqualsHashCode}}
<commons-lang3-version>3.17.0</commons-lang3-version>
{{/useReflectionEqualsHashCode}}
<spotless.version>2.21.0</spotless.version>
</properties>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ ext {
{{#hasHttpSignatureMethods}}
tomitribe_http_signatures_version = "1.7"
{{/hasHttpSignatureMethods}}
{{#useReflectionEqualsHashCode}}
commons_lang3_version = "3.17.0"
{{/useReflectionEqualsHashCode}}
}

dependencies {
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,15 @@
<artifactId>jersey-apache-connector</artifactId>
<version>${jersey-version}</version>
</dependency>
{{#useReflectionEqualsHashCode}}
<!-- For equals and hashCode using reflection -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3-version}</version>
</dependency>
{{/useReflectionEqualsHashCode}}

<!-- test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down Expand Up @@ -408,6 +417,9 @@
{{#hasOAuthMethods}}
<scribejava-apis-version>8.3.3</scribejava-apis-version>
{{/hasOAuthMethods}}
{{#useReflectionEqualsHashCode}}
<commons-lang3-version>3.17.0</commons-lang3-version>
{{/useReflectionEqualsHashCode}}
<spotless.version>2.21.0</spotless.version>
</properties>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
{{#microprofileMutiny}}
<mutiny.version>1.2.0</mutiny.version>
<mutiny.version>1.10.0</mutiny.version>
{{/microprofileMutiny}}
{{#useReflectionEqualsHashCode}}
<commons.lang3.version>3.17.0</commons.lang3.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@
<version>${jakarta.annotation.version}</version>
<scope>provided</scope>
</dependency>
{{#microprofileMutiny}}
<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>mutiny</artifactId>
<version>${mutiny.version}</version>
</dependency>
{{/microprofileMutiny}}
{{#useReflectionEqualsHashCode}}
<!-- For equals and hashCode using reflection -->
<dependency>
Expand Down Expand Up @@ -241,6 +248,9 @@
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
{{#microprofileMutiny}}
<mutiny.version>1.10.0</mutiny.version>
{{/microprofileMutiny}}
{{#useReflectionEqualsHashCode}}
<commons.lang3.version>3.17.0</commons.lang3.version>
{{/useReflectionEqualsHashCode}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ ext {
{{#hasFormParamsInSpec}}
httpmime_version = "4.5.13"
{{/hasFormParamsInSpec}}
{{#useReflectionEqualsHashCode}}
commons_lang3_version = "3.17.0"
{{/useReflectionEqualsHashCode}}
}

dependencies {
Expand All @@ -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"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,14 @@
<version>${httpmime-version}</version>
</dependency>
{{/hasFormParamsInSpec}}
{{#useReflectionEqualsHashCode}}
<!-- For equals and hashCode using reflection -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3-version}</version>
</dependency>
{{/useReflectionEqualsHashCode}}

<!-- test dependencies -->
<dependency>
Expand Down Expand Up @@ -304,6 +312,9 @@
{{#hasFormParamsInSpec}}
<httpmime-version>4.5.14</httpmime-version>
{{/hasFormParamsInSpec}}
{{#useReflectionEqualsHashCode}}
<commons-lang3-version>3.17.0</commons-lang3-version>
{{/useReflectionEqualsHashCode}}
<junit-version>5.10.2</junit-version>
<spotless.version>2.27.2</spotless.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
{{/swagger2AnnotationLibrary}}
<okhttp-version>4.12.0</okhttp-version>
<gson-version>2.10.1</gson-version>
<commons-lang3-version>3.14.0</commons-lang3-version>
<commons-lang3-version>3.17.0</commons-lang3-version>
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
{{/openApiNullable}}
Expand Down
Loading
Loading