Code clean-up: Add own private static final LOGGER in each class (#26)

This commit is contained in:
Jérémie Bresson 2018-05-13 15:42:33 +02:00 committed by Jim Schubert
parent bf7e4e7df7
commit ab9c4b5a61
47 changed files with 117 additions and 22 deletions

View File

@ -38,7 +38,7 @@ import java.util.List;
import java.util.Map;
public class Generator {
static Logger LOGGER = LoggerFactory.getLogger(Generator.class);
private static final Logger LOGGER = LoggerFactory.getLogger(Generator.class);
public static Map<String, CliOption> getOptions(String language) throws ApiException {
CodegenConfig config = null;

View File

@ -69,7 +69,7 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class DefaultCodegen implements CodegenConfig {
protected static final Logger LOGGER = LoggerFactory.getLogger(DefaultCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultCodegen.class);
protected String inputSpec;
protected String outputFolder = "";

View File

@ -35,6 +35,8 @@ import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.CodegenSecurity;
import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.Arrays;
@ -44,6 +46,8 @@ import java.util.List;
import java.util.Map;
abstract public class AbstractAdaCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractAdaCodegen.class);
protected String packageName = "defaultPackage";
protected String projectName = "defaultProject";
protected List<Map<String, Object>> orderedModels;

View File

@ -71,7 +71,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
protected Set<String> collectionTypes;
protected Set<String> mapTypes;
protected Logger LOGGER = LoggerFactory.getLogger(AbstractCSharpCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCSharpCodegen.class);
public AbstractCSharpCodegen() {
super();

View File

@ -17,14 +17,18 @@
package org.openapitools.codegen.languages;
import io.swagger.v3.oas.models.media.Schema;
import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.DefaultCodegen;
import io.swagger.v3.oas.models.media.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
abstract public class AbstractCppCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCppCodegen.class);
public AbstractCppCodegen() {
super();

View File

@ -46,8 +46,11 @@ import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.core.util.Json;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class AbstractEiffelCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractEiffelCodegen.class);
private final Set<String> parentModels = new HashSet<>();
private final Multimap<String, CodegenModel> childrenByParent = ArrayListMultimap.create();

View File

@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
public abstract class AbstractGoCodegen extends DefaultCodegen implements CodegenConfig {
protected static Logger LOGGER = LoggerFactory.getLogger(AbstractGoCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractGoCodegen.class);
protected boolean withXml = false;

View File

@ -54,7 +54,7 @@ import java.util.regex.Pattern;
public abstract class AbstractJavaCodegen extends DefaultCodegen implements CodegenConfig {
static Logger LOGGER = LoggerFactory.getLogger(AbstractJavaCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractJavaCodegen.class);
public static final String FULL_JAVA_UTIL = "fullJavaUtil";
public static final String DEFAULT_LIBRARY = "<default>";
public static final String DATE_LIBRARY = "dateLibrary";

View File

@ -52,7 +52,7 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
protected boolean useBeanValidation = true;
static Logger LOGGER = LoggerFactory.getLogger(AbstractJavaJAXRSServerCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractJavaJAXRSServerCodegen.class);
public AbstractJavaJAXRSServerCodegen() {
super();

View File

@ -37,7 +37,7 @@ import java.util.HashSet;
import java.util.Map;
public abstract class AbstractKotlinCodegen extends DefaultCodegen implements CodegenConfig {
static Logger LOGGER = LoggerFactory.getLogger(AbstractKotlinCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractKotlinCodegen.class);
protected String artifactId;
protected String artifactVersion = "1.0.0";

View File

@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
public abstract class AbstractPhpCodegen extends DefaultCodegen implements CodegenConfig {
static Logger LOGGER = LoggerFactory.getLogger(AbstractPhpCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractPhpCodegen.class);
public static final String VARIABLE_NAMING_CONVENTION = "variableNamingConvention";
public static final String PACKAGE_PATH = "packagePath";

View File

@ -26,6 +26,8 @@ import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.Arrays;
@ -34,6 +36,7 @@ import java.util.List;
import java.util.Map;
public abstract class AbstractScalaCodegen extends DefaultCodegen {
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractScalaCodegen.class);
protected String modelPropertyNaming = "camelCase";
protected String invokerPackage = "org.openapitools.client";

View File

@ -24,11 +24,15 @@ import io.swagger.v3.oas.models.parameters.Parameter;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.*;
public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractTypeScriptClientCodegen.class);
private static final String X_DISCRIMINATOR_TYPE = "x-discriminator-value";
private static final String UNDEFINED_VALUE = "undefined";

View File

@ -37,6 +37,8 @@ import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.oas.models.parameters.*;
import org.apache.commons.lang3.StringEscapeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.HashSet;
@ -45,6 +47,7 @@ import java.util.Map;
import java.util.Set;
public class BashClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(BashClientCodegen.class);
protected String apiVersion = "1.0.0";

View File

@ -23,6 +23,8 @@ import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.parser.util.SchemaTypeUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.Arrays;
@ -32,6 +34,8 @@ import java.util.Map;
import java.util.Set;
public class CppQt5ClientCodegen extends AbstractCppCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(CppQt5ClientCodegen.class);
public static final String CPP_NAMESPACE = "cppNamespace";
public static final String CPP_NAMESPACE_DESC = "C++ namespace (convention: name::space::for::api).";
public static final String OPTIONAL_PROJECT_FILE_DESC = "Generate client.pri.";

View File

@ -28,6 +28,8 @@ import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.media.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.ArrayList;
@ -38,6 +40,8 @@ import java.util.List;
import java.util.Map;
public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(DartClientCodegen.class);
public static final String BROWSER_CLIENT = "browserClient";
public static final String PUB_NAME = "pubName";
public static final String PUB_VERSION = "pubVersion";

View File

@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory;
import org.openapitools.codegen.*;
public class EiffelClientCodegen extends AbstractEiffelCodegen {
static Logger LOGGER = LoggerFactory.getLogger(EiffelClientCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(EiffelClientCodegen.class);
protected String libraryTarget = "openapi_eiffel_client";
protected String packageName = "Eiffel";

View File

@ -27,6 +27,8 @@ import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.media.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.jws.WebParam;
import java.io.File;
@ -37,6 +39,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(ElixirClientCodegen.class);
protected String apiVersion = "1.0.0";
protected String moduleName;
protected static final String defaultModuleName = "OpenAPI.Client";

View File

@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig {
static Logger LOGGER = LoggerFactory.getLogger(ErlangClientCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(ErlangClientCodegen.class);
protected String packageName = "openapi";
protected String packageVersion = "1.0.0";

View File

@ -27,6 +27,8 @@ import io.swagger.v3.oas.models.*;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.oas.models.parameters.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.Arrays;
@ -36,6 +38,8 @@ import java.util.HashSet;
import org.apache.commons.lang3.StringUtils;
public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(FlashClientCodegen.class);
protected String packageName = "org.openapitools";
protected String packageVersion;

View File

@ -27,6 +27,8 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.*;
@ -34,6 +36,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(HaskellHttpClientCodegen.class);
// source folder where to write the files
protected String sourceFolder = "lib";

View File

@ -36,9 +36,12 @@ import io.swagger.v3.oas.models.parameters.Parameter;
import io.swagger.v3.oas.models.media.*;
import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.regex.Pattern;
public class HaskellServantCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(HaskellServantCodegen.class);
// source folder where to write the files
protected String sourceFolder = "src";

View File

@ -34,6 +34,8 @@ import io.swagger.v3.oas.models.PathItem.HttpMethod;
import io.swagger.v3.oas.models.*;
import io.swagger.v3.oas.models.parameters.*;
import io.swagger.v3.oas.models.info.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.TreeSet;
import java.util.*;
@ -42,6 +44,7 @@ import java.io.File;
import org.apache.commons.lang3.StringUtils;
public class JavascriptClosureAngularClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(JavascriptClosureAngularClientCodegen.class);
public static final String USE_ES6 = "useEs6";

View File

@ -32,7 +32,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
public static final String DATE_LIBRARY = "dateLibrary";
protected CodegenConstants.ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.camelCase;
static Logger LOGGER = LoggerFactory.getLogger(KotlinClientCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(KotlinClientCodegen.class);
protected String dateLibrary = DateLibrary.JAVA8.value;

View File

@ -41,7 +41,7 @@ import java.util.Map;
public class KotlinServerCodegen extends AbstractKotlinCodegen {
public static final String DEFAULT_LIBRARY = Constants.KTOR;
static Logger LOGGER = LoggerFactory.getLogger(KotlinServerCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(KotlinServerCodegen.class);
private Boolean autoHeadFeatureEnabled = true;
private Boolean conditionalHeadersFeatureEnabled = false;
private Boolean hstsFeatureEnabled = true;

View File

@ -33,7 +33,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class LuaClientCodegen extends DefaultCodegen implements CodegenConfig {
static Logger LOGGER = LoggerFactory.getLogger(LuaClientCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(LuaClientCodegen.class);
protected String specFolder = "spec";
protected String packageName = "openapi-client";

View File

@ -32,6 +32,8 @@ import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.Arrays;
@ -44,6 +46,8 @@ import java.util.Set;
import org.apache.commons.lang3.StringUtils;
public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(ObjcClientCodegen.class);
public static final String CLASS_PREFIX = "classPrefix";
public static final String POD_NAME = "podName";
public static final String AUTHOR_NAME = "authorName";

View File

@ -23,6 +23,8 @@ import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.Arrays;
@ -32,6 +34,8 @@ import java.util.regex.Matcher;
import org.apache.commons.lang3.StringUtils;
public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(PerlClientCodegen.class);
public static final String MODULE_NAME = "moduleName";
public static final String MODULE_VERSION = "moduleVersion";
protected String moduleName = "WWW::OpenAPIClient";

View File

@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
@SuppressWarnings("hiding")
static Logger LOGGER = LoggerFactory.getLogger(PhpClientCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(PhpClientCodegen.class);
public static final String VARIABLE_NAMING_CONVENTION = "variableNamingConvention";
public static final String PACKAGE_PATH = "packagePath";

View File

@ -36,7 +36,7 @@ import java.util.*;
public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements CodegenConfig {
@SuppressWarnings("hiding")
static Logger LOGGER = LoggerFactory.getLogger(PhpSymfonyServerCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(PhpSymfonyServerCodegen.class);
public static final String BUNDLE_NAME = "bundleName";
public static final String COMPOSER_VENDOR_NAME = "composerVendorName";

View File

@ -38,7 +38,7 @@ import java.util.Map;
import static java.util.UUID.randomUUID;
public class PowerShellClientCodegen extends DefaultCodegen implements CodegenConfig {
static Logger LOGGER = LoggerFactory.getLogger(PowerShellClientCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(PowerShellClientCodegen.class);
private String packageGuid = "{" + randomUUID().toString().toUpperCase() + "}";

View File

@ -32,6 +32,8 @@ import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.parser.util.SchemaTypeUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.ArrayList;
@ -46,6 +48,8 @@ import org.apache.commons.lang3.StringUtils;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(PythonClientCodegen.class);
public static final String PACKAGE_URL = "packageUrl";
public static final String DEFAULT_LIBRARY = "urllib3";

View File

@ -29,7 +29,7 @@ import java.io.File;
import java.util.*;
public class RClientCodegen extends DefaultCodegen implements CodegenConfig {
static Logger LOGGER = LoggerFactory.getLogger(RClientCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(RClientCodegen.class);
protected String packageName = "openapi";
protected String packageVersion = "1.0.0";

View File

@ -32,7 +32,7 @@ import java.util.List;
import java.util.Map;
public class RustClientCodegen extends DefaultCodegen implements CodegenConfig {
static Logger LOGGER = LoggerFactory.getLogger(RustClientCodegen.class);
private static final Logger LOGGER = LoggerFactory.getLogger(RustClientCodegen.class);
public static final String PACKAGE_NAME = "packageName";
public static final String PACKAGE_VERSION = "packageVersion";

View File

@ -27,12 +27,15 @@ import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.oas.models.parameters.*;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.*;
import java.io.File;
public class ScalaGatlingCodegen extends AbstractScalaCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(ScalaGatlingCodegen.class);
// source folder where to write the files
protected String sourceFolder = "src" + File.separator + "gatling" + File.separator + "scala";

View File

@ -19,12 +19,16 @@ package org.openapitools.codegen.languages;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.Arrays;
import java.util.HashMap;
public class ScalaHttpClientCodegen extends AbstractScalaCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(ScalaHttpClientCodegen.class);
protected String authScheme = "";
protected String gradleWrapperPackage = "gradle.wrapper";
protected boolean authPreemptive;

View File

@ -21,8 +21,11 @@ import org.openapitools.codegen.*;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(ScalaLagomServerCodegen.class);
private String authScheme = "";
private boolean authPreemptive = false;

View File

@ -21,6 +21,8 @@ import com.samskivert.mustache.Mustache;
import com.samskivert.mustache.Template;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
@ -30,6 +32,7 @@ import java.util.Arrays;
import java.util.HashMap;
public class ScalazClientCodegen extends AbstractScalaCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(ScalazClientCodegen.class);
public ScalazClientCodegen() {
super();

View File

@ -37,6 +37,8 @@ import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
import org.openapitools.codegen.languages.features.OptionalFeatures;
import org.openapitools.codegen.utils.URLPathUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
@ -51,6 +53,8 @@ import java.util.regex.Matcher;
public class SpringCodegen extends AbstractJavaCodegen
implements BeanValidationFeatures, OptionalFeatures {
private static final Logger LOGGER = LoggerFactory.getLogger(SpringCodegen.class);
public static final String DEFAULT_LIBRARY = "spring-boot";
public static final String TITLE = "title";
public static final String SERVER_PORT = "serverPort";

View File

@ -35,6 +35,8 @@ import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.Markdown;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.HashSet;
@ -42,6 +44,8 @@ import java.util.List;
import java.util.Map;
public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(StaticHtml2Generator.class);
protected String invokerPackage = "org.openapitools.client"; // default for Java and Android
protected String phpInvokerPackage = "OpenAPITools\\Client"; // default for PHP
protected String packageName = "Org.OpenAPITools"; // default for C#

View File

@ -24,6 +24,8 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.text.WordUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.*;
@ -31,6 +33,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Swift3Codegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(Swift3Codegen.class);
public static final String PROJECT_NAME = "projectName";
public static final String RESPONSE_AS = "responseAs";
public static final String UNWRAP_REQUIRED = "unwrapRequired";

View File

@ -24,6 +24,8 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.text.WordUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.*;
@ -31,6 +33,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(Swift4Codegen.class);
public static final String PROJECT_NAME = "projectName";
public static final String RESPONSE_AS = "responseAs";
public static final String UNWRAP_REQUIRED = "unwrapRequired";

View File

@ -26,6 +26,8 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.text.WordUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.*;
@ -38,6 +40,8 @@ import java.util.regex.Pattern;
*/
public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(SwiftClientCodegen.class);
public static final String PROJECT_NAME = "projectName";
public static final String RESPONSE_AS = "responseAs";
public static final String UNWRAP_REQUIRED = "unwrapRequired";

View File

@ -22,12 +22,16 @@ import io.swagger.v3.parser.util.SchemaTypeUtil;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import org.openapitools.codegen.utils.SemVer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.*;
public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCodegen {
private static final Logger LOGGER = LoggerFactory.getLogger(TypeScriptAngularClientCodegen.class);
private static final SimpleDateFormat SNAPSHOT_SUFFIX_FORMAT = new SimpleDateFormat("yyyyMMddHHmm");
private static final String X_DISCRIMINATOR_TYPE = "x-discriminator-value";

View File

@ -55,7 +55,7 @@ import java.util.Map;
public class ModelUtils {
static Logger LOGGER = LoggerFactory.getLogger(ModelUtils.class);
private static final Logger LOGGER = LoggerFactory.getLogger(ModelUtils.class);
/**
* Searches for the model by name in the map of models and returns it

View File

@ -30,7 +30,7 @@ import java.util.List;
public class URLPathUtils {
protected static final Logger LOGGER = LoggerFactory.getLogger(URLPathUtils.class);
private static final Logger LOGGER = LoggerFactory.getLogger(URLPathUtils.class);
public static final String LOCAL_HOST = "http://localhost";
public static URL getServerURL(OpenAPI openAPI) {

View File

@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
@SuppressWarnings("static-method")
public class PhpModelTest {
protected static final Logger LOGGER = LoggerFactory.getLogger(PhpModelTest.class);
private static final Logger LOGGER = LoggerFactory.getLogger(PhpModelTest.class);
@Test(description = "convert a simple php model")
public void simpleModelTest() {