forked from loafle/openapi-generator-original
minor enhancement to java client generator (#7253)
This commit is contained in:
parent
d3017ffba8
commit
06ab5b5c0f
@ -22,7 +22,6 @@ import io.swagger.v3.oas.models.media.Schema;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openapitools.codegen.*;
|
||||
import org.openapitools.codegen.config.GlobalSettings;
|
||||
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
|
||||
import org.openapitools.codegen.languages.features.GzipFeatures;
|
||||
import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures;
|
||||
@ -40,7 +39,6 @@ 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;
|
||||
import static org.openapitools.codegen.utils.OnceLogger.once;
|
||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||
|
||||
public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
@ -96,7 +94,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
// (mustache does not allow for boolean operators so we need this extra field)
|
||||
protected boolean doNotUseRx = true;
|
||||
protected boolean usePlayWS = false;
|
||||
protected String playVersion = PLAY_25;
|
||||
protected String playVersion = PLAY_26;
|
||||
protected String microprofileFramework = MICROPROFILE_DEFAULT;
|
||||
|
||||
protected boolean asyncNative = false;
|
||||
@ -264,12 +262,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
|
||||
// Microprofile framework
|
||||
if (additionalProperties.containsKey(MICROPROFILE_FRAMEWORK)) {
|
||||
this.setMicroprofileFramework(additionalProperties.get(MICROPROFILE_FRAMEWORK).toString());
|
||||
|
||||
if (!MICROPROFILE_KUMULUZEE.equals(microprofileFramework)) {
|
||||
throw new RuntimeException("Ivalid microprofileFramework '{}'. Must be 'kumuluzee' or none.");
|
||||
throw new RuntimeException("Invalid microprofileFramework '" + microprofileFramework + "'. Must be 'kumuluzee' or none.");
|
||||
}
|
||||
|
||||
this.setMicroprofileFramework(additionalProperties.get(MICROPROFILE_FRAMEWORK).toString());
|
||||
}
|
||||
additionalProperties.put(MICROPROFILE_FRAMEWORK, microprofileFramework);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user