diff --git a/bin/configs/java-resttemplate-withXml.yaml b/bin/configs/java-resttemplate-withXml.yaml
index 0307a5832649..9f58d1527186 100644
--- a/bin/configs/java-resttemplate-withXml.yaml
+++ b/bin/configs/java-resttemplate-withXml.yaml
@@ -3,6 +3,7 @@ outputDir: samples/client/petstore/java/resttemplate-withXml
library: resttemplate
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
additionalProperties:
+ java8: true
withXml: "true"
artifactId: petstore-resttemplate-withxml
hideGenerationTimestamp: "true"
diff --git a/bin/configs/java-resttemplate.yaml b/bin/configs/java-resttemplate.yaml
index 4bbfa2f688c4..0b980323ec3b 100644
--- a/bin/configs/java-resttemplate.yaml
+++ b/bin/configs/java-resttemplate.yaml
@@ -5,3 +5,4 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e
additionalProperties:
artifactId: petstore-resttemplate
hideGenerationTimestamp: "true"
+ java8: true
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache
index ce81b1ee0df3..f1b5a3c44258 100644
--- a/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache
@@ -16,7 +16,7 @@
1.2.5
3.10.0
1.3.2
- 2.6.1-SNAPSHOT
+ 2.6.0
2.6.0
1.7.25
4.11
@@ -36,14 +36,6 @@
-
- oss-snapshots
- JFrog OSS Snapshots
- https://oss.jfrog.org/simple/oss-snapshot-local/
-
- true
-
-
central
Maven Repository Switchboard
diff --git a/samples/client/petstore/java/resttemplate-withXml/README.md b/samples/client/petstore/java/resttemplate-withXml/README.md
index 419778f2ccc1..9824bb25a38a 100644
--- a/samples/client/petstore/java/resttemplate-withXml/README.md
+++ b/samples/client/petstore/java/resttemplate-withXml/README.md
@@ -13,7 +13,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod
Building the API client library requires:
-1. Java 1.7+
+1. Java 1.8+
2. Maven/Gradle
## Installation
diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle
index 78af354d3a46..f3a4d1fbaeee 100644
--- a/samples/client/petstore/java/resttemplate-withXml/build.gradle
+++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle
@@ -33,8 +33,8 @@ if(hasProperty('target') && target == 'android') {
targetSdkVersion 22
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
// Rename the aar correctly
@@ -79,8 +79,8 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'java'
apply plugin: 'maven'
- sourceCompatibility = JavaVersion.VERSION_1_7
- targetCompatibility = JavaVersion.VERSION_1_7
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
install {
repositories.mavenInstaller {
@@ -115,6 +115,7 @@ dependencies {
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
+ implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
implementation 'javax.annotation:javax.annotation-api:1.3.2'
diff --git a/samples/client/petstore/java/resttemplate-withXml/pom.xml b/samples/client/petstore/java/resttemplate-withXml/pom.xml
index f10ece0ffdc6..e8e0ab812eb2 100644
--- a/samples/client/petstore/java/resttemplate-withXml/pom.xml
+++ b/samples/client/petstore/java/resttemplate-withXml/pom.xml
@@ -137,8 +137,8 @@
maven-compiler-plugin
3.6.1
- 1.7
- 1.7
+ 1.8
+ 1.8
@@ -257,6 +257,11 @@
${jackson-version}
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+ ${jackson-version}
+
com.github.joschi.jackson
jackson-datatype-threetenbp
diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index 3241b227af11..fb74ffbdc0e2 100644
--- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -129,7 +129,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
if (this.mapString == null) {
- this.mapString = new HashMap();
+ this.mapString = new HashMap<>();
}
this.mapString.put(key, mapStringItem);
return this;
@@ -164,7 +164,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
if (this.mapNumber == null) {
- this.mapNumber = new HashMap();
+ this.mapNumber = new HashMap<>();
}
this.mapNumber.put(key, mapNumberItem);
return this;
@@ -199,7 +199,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
if (this.mapInteger == null) {
- this.mapInteger = new HashMap();
+ this.mapInteger = new HashMap<>();
}
this.mapInteger.put(key, mapIntegerItem);
return this;
@@ -234,7 +234,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
if (this.mapBoolean == null) {
- this.mapBoolean = new HashMap();
+ this.mapBoolean = new HashMap<>();
}
this.mapBoolean.put(key, mapBooleanItem);
return this;
@@ -269,7 +269,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) {
if (this.mapArrayInteger == null) {
- this.mapArrayInteger = new HashMap>();
+ this.mapArrayInteger = new HashMap<>();
}
this.mapArrayInteger.put(key, mapArrayIntegerItem);
return this;
@@ -304,7 +304,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List
@@ -249,6 +249,11 @@
jackson-databind-nullable
${jackson-databind-nullable-version}
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+ ${jackson-version}
+
com.github.joschi.jackson
jackson-datatype-threetenbp
diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index 4e476cf79de1..450b245ab2b9 100644
--- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -89,7 +89,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
if (this.mapString == null) {
- this.mapString = new HashMap();
+ this.mapString = new HashMap<>();
}
this.mapString.put(key, mapStringItem);
return this;
@@ -124,7 +124,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
if (this.mapNumber == null) {
- this.mapNumber = new HashMap();
+ this.mapNumber = new HashMap<>();
}
this.mapNumber.put(key, mapNumberItem);
return this;
@@ -159,7 +159,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
if (this.mapInteger == null) {
- this.mapInteger = new HashMap();
+ this.mapInteger = new HashMap<>();
}
this.mapInteger.put(key, mapIntegerItem);
return this;
@@ -194,7 +194,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
if (this.mapBoolean == null) {
- this.mapBoolean = new HashMap();
+ this.mapBoolean = new HashMap<>();
}
this.mapBoolean.put(key, mapBooleanItem);
return this;
@@ -229,7 +229,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) {
if (this.mapArrayInteger == null) {
- this.mapArrayInteger = new HashMap>();
+ this.mapArrayInteger = new HashMap<>();
}
this.mapArrayInteger.put(key, mapArrayIntegerItem);
return this;
@@ -264,7 +264,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List