Skip to content

Commit 216ba30

Browse files
authored
[JAVA] Add missing dependencies in templates (#20075)
* Add commons-lang3 dependency for useReflectionEqualsHashCode * Fix feign-no-nullable config/sample * Add commons-lang3 dependency to jersey2 * Add & update mutiny dependency for microprofile * Regenerate samples
1 parent ee698f1 commit 216ba30

File tree

426 files changed

+10340
-2528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

426 files changed

+10340
-2528
lines changed

.github/workflows/samples-java-client-jdk11.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,15 @@ jobs:
6363
- samples/client/petstore/java/rest-assured
6464
- samples/client/petstore/java/rest-assured-jackson
6565
- samples/client/petstore/java/microprofile-rest-client
66+
- samples/client/petstore/java/microprofile-rest-client-mutiny
6667
- samples/client/petstore/java/microprofile-rest-client-3.0
6768
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson
6869
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml
70+
- samples/client/petstore/java/microprofile-rest-client-3.0-mutiny
6971
- samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
7072
- samples/client/petstore/java/apache-httpclient
7173
- samples/client/petstore/java/feign
74+
- samples/client/petstore/java/feign-no-nullable
7275
- samples/client/petstore/java/okhttp-gson-awsv4signature
7376
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters
7477
- samples/openapi3/client/petstore/java/native

bin/configs/java-feign-no-nullable.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ templateDir: modules/openapi-generator/src/main/resources/Java
66
additionalProperties:
77
booleanGetterPrefix: is
88
artifactId: petstore-feign-no-nullable
9-
hideGenerationTimestamp: "true"
9+
hideGenerationTimestamp: true
1010
additionalModelTypeAnnotations: '@javax.annotation.concurrent.Immutable'
11-
openApiNullable: "false"
11+
openApiNullable: false
12+
useReflectionEqualsHashCode: true
13+
annotationLibrary: "swagger1"

bin/configs/java-jersey2-8.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ additionalProperties:
1111
useOneOfDiscriminatorLookup: true
1212
disallowAdditionalPropertiesIfNotPresent: false
1313
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"
14-
failOnUnknownProperties: true
14+
failOnUnknownProperties: true
15+
useReflectionEqualsHashCode: true

bin/configs/java-jersey3.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ additionalProperties:
1212
useOneOfDiscriminatorLookup: true
1313
disallowAdditionalPropertiesIfNotPresent: false
1414
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"
15-
failOnUnknownProperties: true
15+
failOnUnknownProperties: true
16+
useReflectionEqualsHashCode: true
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0-mutiny
3+
library: microprofile
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
artifactId: microprofile-rest-client-3-mutiny
8+
configKey: petstore
9+
microprofileRestClientVersion: "3.0"
10+
microprofileMutiny: true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/microprofile-rest-client-mutiny
3+
library: microprofile
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
artifactId: microprofile-rest-client-mutiny
8+
configKeyFromClassName: true
9+
microprofileMutiny: true

bin/configs/java-native.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ additionalProperties:
77
artifactId: petstore-native
88
hideGenerationTimestamp: "true"
99
generateBuilders: true
10+
useReflectionEqualsHashCode: "true"

bin/configs/java-okhttp-gson.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ parameterNameMappings:
1111
type_: typeWithUnderscore
1212
additionalProperties:
1313
artifactId: petstore-okhttp-gson
14-
hideGenerationTimestamp: "true"
15-
useOneOfDiscriminatorLookup: "true"
14+
hideGenerationTimestamp: true
15+
useOneOfDiscriminatorLookup: true
1616
disallowAdditionalPropertiesIfNotPresent: false
17+
useReflectionEqualsHashCode:: true
1718
enumNameMappings:
1819
s: LOWER_CASE_S
1920
S: UPPER_CASE_S

modules/openapi-generator/src/main/resources/Java/build.gradle.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ ext {
126126
jersey_version = "1.19.4"
127127
jodatime_version = "2.9.9"
128128
junit_version = "5.10.2"
129+
{{#useReflectionEqualsHashCode}}
130+
commons_lang3_version = "3.17.0"
131+
{{/useReflectionEqualsHashCode}}
129132
}
130133

131134
dependencies {
@@ -148,6 +151,9 @@ dependencies {
148151
{{#useBeanValidation}}
149152
implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version"
150153
{{/useBeanValidation}}
154+
{{#useReflectionEqualsHashCode}}
155+
implementation "org.apache.commons:commons-lang3:$commons_lang3_version"
156+
{{/useReflectionEqualsHashCode}}
151157
testImplementation "junit:junit:$junit_version"
152158
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
153159
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"

modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ ext {
114114
feign_form_version = "3.8.0"
115115
junit_version = "5.7.0"
116116
scribejava_version = "8.0.0"
117+
{{#useReflectionEqualsHashCode}}
118+
commons_lang3_version = "3.17.0"
119+
{{/useReflectionEqualsHashCode}}
117120
}
118121

119122
dependencies {
@@ -127,9 +130,9 @@ dependencies {
127130
implementation "io.github.openfeign:feign-okhttp:$feign_version"
128131
implementation "io.github.openfeign.form:feign-form:$feign_form_version"
129132
{{#jackson}}
130-
{{#joda}}
133+
{{#joda}}
131134
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
132-
{{/joda}}
135+
{{/joda}}
133136
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
134137
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
135138
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
@@ -142,6 +145,9 @@ dependencies {
142145
implementation "com.github.scribejava:scribejava-core:$scribejava_version"
143146
implementation "com.brsanthu:migbase64:2.2"
144147
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
148+
{{#useReflectionEqualsHashCode}}
149+
implementation "org.apache.commons:commons-lang3:$commons_lang3_version"
150+
{{/useReflectionEqualsHashCode}}
145151
testImplementation "org.junit.jupiter:junit-jupiter:$junit_version"
146152
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
147153
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version"

0 commit comments

Comments
 (0)