Skip to content

Commit 6494638

Browse files
Add internal java17 additionalProperty setting
1 parent 963f58a commit 6494638

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
109109
// Internal configurations
110110
public static final String SINGLE_REQUEST_PARAMETER = "singleRequestParameter";
111111
public static final String STATIC_REQUEST = "staticRequest";
112-
// TODO attempt to implement the setting similar to how it is done here https://github.com/OpenAPITools/openapi-generator/pull/20590/files
113112
public static final String JAVA_17 = "java17";
114113

115114
public static final String SERIALIZATION_LIBRARY_GSON = "gson";
@@ -380,6 +379,10 @@ public void processOpts() {
380379
writePropertyBack(SINGLE_REQUEST_PARAMETER, getSingleRequestParameter());
381380
writePropertyBack(STATIC_REQUEST, getStaticRequest());
382381

382+
if (libWebClient && (useSealedOneOfInterfaces || useJakartaEe)) {
383+
writePropertyBack(JAVA_17, true);
384+
}
385+
383386
if (!useRxJava && !useRxJava2 && !useRxJava3) {
384387
additionalProperties.put(DO_NOT_USE_RX, true);
385388
}

samples/client/petstore/java/webclient-sealedInterface/gradlew

100644100755
File mode changed.

samples/client/petstore/java/webclient-sealedInterface/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
<artifactId>maven-compiler-plugin</artifactId>
3939
<version>3.13.0</version>
4040
<configuration>
41-
<source>1.8</source>
42-
<target>1.8</target>
41+
<source>17</source>
42+
<target>17</target>
4343
</configuration>
4444
</plugin>
4545
<plugin>

0 commit comments

Comments
 (0)