forked from loafle/openapi-generator-original
Fix string comparison in Python generator's abstract class (#7030)
* fix string comparison in PythonAbstractConnexionServerCodegen.java * rename abstract class * put public first
This commit is contained in:
parent
276a983fe8
commit
5f8e28a39d
@ -43,8 +43,8 @@ import java.util.*;
|
||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||
import static org.openapitools.codegen.utils.StringUtils.underscore;
|
||||
|
||||
public class PythonAbstractConnexionServerCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PythonAbstractConnexionServerCodegen.class);
|
||||
public abstract class AbstractPythonConnexionServerCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractPythonConnexionServerCodegen.class);
|
||||
|
||||
public static final String CONTROLLER_PACKAGE = "controllerPackage";
|
||||
public static final String DEFAULT_CONTROLLER = "defaultController";
|
||||
@ -64,7 +64,7 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme
|
||||
protected boolean useNose = Boolean.FALSE;
|
||||
protected String pythonSrcRoot;
|
||||
|
||||
public PythonAbstractConnexionServerCodegen(String templateDirectory, boolean fixBodyNameValue) {
|
||||
public AbstractPythonConnexionServerCodegen(String templateDirectory, boolean fixBodyNameValue) {
|
||||
super();
|
||||
|
||||
modifyFeatureSet(features -> features.includeDocumentationFeatures(DocumentationFeature.Readme));
|
||||
@ -248,7 +248,7 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme
|
||||
pySrcRoot = val.replaceAll("[/\\\\]+$", "");
|
||||
}
|
||||
|
||||
if (pySrcRoot.isEmpty() || pySrcRoot == ".") {
|
||||
if (pySrcRoot.isEmpty() || ".".equals(pySrcRoot)) {
|
||||
this.pythonSrcRoot = "";
|
||||
} else {
|
||||
this.pythonSrcRoot = pySrcRoot + File.separator;
|
@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class PythonAiohttpConnexionServerCodegen extends PythonAbstractConnexionServerCodegen {
|
||||
public class PythonAiohttpConnexionServerCodegen extends AbstractPythonConnexionServerCodegen {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PythonAiohttpConnexionServerCodegen.class);
|
||||
|
||||
public PythonAiohttpConnexionServerCodegen() {
|
||||
|
@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory;
|
||||
import java.io.File;
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class PythonBluePlanetServerCodegen extends PythonAbstractConnexionServerCodegen {
|
||||
public class PythonBluePlanetServerCodegen extends AbstractPythonConnexionServerCodegen {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PythonBluePlanetServerCodegen.class);
|
||||
|
||||
protected String modelDocPath = "";
|
||||
|
@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class PythonFlaskConnexionServerCodegen extends PythonAbstractConnexionServerCodegen {
|
||||
public class PythonFlaskConnexionServerCodegen extends AbstractPythonConnexionServerCodegen {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PythonFlaskConnexionServerCodegen.class);
|
||||
|
||||
public PythonFlaskConnexionServerCodegen() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user