[java-client] WebClient requires java8 (#460)

* Usage of webclient library forces java8 to be true

* Run bin/java-petstore-webclient.sh
This commit is contained in:
Jérémie Bresson 2018-07-05 06:26:02 +02:00 committed by William Cheng
parent ef2b372dd3
commit b0cae23777
2 changed files with 7 additions and 5 deletions

View File

@ -17,6 +17,10 @@
package org.openapitools.codegen.languages;
import static com.google.common.base.CaseFormat.LOWER_CAMEL;
import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
import static java.util.Collections.sort;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.CliOption;
@ -45,10 +49,6 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import static com.google.common.base.CaseFormat.LOWER_CAMEL;
import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
import static java.util.Collections.sort;
public class JavaClientCodegen extends AbstractJavaCodegen
implements BeanValidationFeatures, PerformBeanValidationFeatures,
GzipFeatures {
@ -287,6 +287,8 @@ public class JavaClientCodegen extends AbstractJavaCodegen
additionalProperties.put("jackson", "true");
supportingFiles.add(new SupportingFile("auth/Authentication.mustache", authFolder, "Authentication.java"));
} else if (WEBCLIENT.equals(getLibrary())) {
setJava8Mode(true);
additionalProperties.put("java8", "true");
additionalProperties.put("jackson", "true");
} else if (VERTX.equals(getLibrary())) {
typeMapping.put("file", "AsyncFile");

View File

@ -12,7 +12,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod
## Requirements
Building the API client library requires:
1. Java 1.7+
1. Java 1.8+
2. Maven/Gradle
## Installation