diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache index 28260368a9b3..fe3c172a6297 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache @@ -88,6 +88,8 @@ public class ApiClient { public ApiClient() { this.dateFormat = createDefaultDateFormat(); this.webClient = buildWebClient(new ObjectMapper(), this.dateFormat); + + init(); } public ApiClient(ObjectMapper mapper, DateFormat format) { @@ -97,6 +99,8 @@ public class ApiClient { private ApiClient(WebClient webClient, DateFormat format) { this.webClient = webClient; this.dateFormat = format; + + init(); } public DateFormat createDefaultDateFormat() { diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java index ee1885811e6f..88b883f366b4 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java @@ -88,6 +88,8 @@ private String collectionToString(Collection collection) public ApiClient() { this.dateFormat = createDefaultDateFormat(); this.webClient = buildWebClient(new ObjectMapper(), this.dateFormat); + + init(); } public ApiClient(ObjectMapper mapper, DateFormat format) { @@ -97,6 +99,8 @@ public ApiClient(ObjectMapper mapper, DateFormat format) { private ApiClient(WebClient webClient, DateFormat format) { this.webClient = webClient; this.dateFormat = format; + + init(); } public DateFormat createDefaultDateFormat() {