diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index ea212c92f18..214f98ea3b3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -497,7 +497,7 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { } else if ("pipes".equals(p.collectionFormat)) { p.vendorExtensions.put("x-codegen-collection-pipes", true); } else { - LOGGER.warn("Unsupported collection format in Bash generator: " + p.collectionFormat); + LOGGER.warn("Unsupported collection format in Bash generator: {}", p.collectionFormat); } } } @@ -778,7 +778,7 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { } else if ("array".equalsIgnoreCase(type) || "map".equalsIgnoreCase(type)) { // skip map/array as it will be handled below } else { - LOGGER.warn("Type " + type + " not handled properly in setParameterExampleValue"); + LOGGER.warn("Type {} not handled properly in setParameterExampleValue", type); } if (example == null) { @@ -802,20 +802,20 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { // rename to empty_method_name_1 (e.g.) if method name is empty if (StringUtils.isEmpty(operationId)) { operationId = camelize("empty_method_name_" + emptyMethodNameCounter++, true); - LOGGER.warn("Empty method name (operationId) found. Renamed to " + operationId); + LOGGER.warn("Empty method name (operationId) found. Renamed to {}", operationId); return operationId; } // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { String newOperationId = underscore("call" + camelize(operationId)); - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } // operationId starts with a number if (operationId.matches("^\\d.*")) { - LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId))); + LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, underscore(sanitizeName("call_" + operationId))); operationId = "call_" + operationId; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java index 78c6e2507e5..4c7a0c74160 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java @@ -519,7 +519,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf } else if (ModelUtils.isObjectSchema(schema)) { return null; // models are managed at moustache level } else { - LOGGER.warn("Type " + schema.getType() + " not handled properly in toExampleValue"); + LOGGER.warn("Type {} not handled properly in toExampleValue", schema.getType()); } if (ModelUtils.isStringSchema(schema)) { @@ -593,13 +593,14 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf // model name cannot use reserved keyword, e.g. return if (isReservedWord(name)) { String modelName = camelize("Model" + name); - LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + modelName); + LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, modelName); return modelName; } // model name starts with number if (name.matches("^\\d.*")) { - LOGGER.warn(name + " (model name starts with number) cannot be used as model name. Renamed to " + camelize("model_" + name)); + LOGGER.warn("{} (model name starts with number) cannot be used as model name. Renamed to {}", name, + camelize("model_" + name)); name = "model_" + name; // e.g. 200Response => Model200Response (after camelize) } @@ -719,21 +720,21 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf // rename to empty_method_name_1 (e.g.) if method name is empty if (StringUtils.isEmpty(operationId)) { operationId = camelize("empty_method_name_" + emptyMethodNameCounter++); - LOGGER.warn("Empty method name (operationId) found. Renamed to " + operationId); + LOGGER.warn("Empty method name (operationId) found. Renamed to {}", operationId); return operationId; } // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { String newOperationId = camelize(sanitizeName("call_" + operationId), true); - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } // operationId starts with a number if (operationId.matches("^\\d.*")) { String newOperationId = camelize(sanitizeName("call_" + operationId), true); - LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } @@ -889,7 +890,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf if (exitValue != 0) { LOGGER.error("Error running the command ({}). Exit code: {}", command, exitValue); } else { - LOGGER.info("Successfully executed: " + command); + LOGGER.info("Successfully executed: {}", command); } } catch (InterruptedException | IOException e) { LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 052868899f2..6f93f3294c9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -311,7 +311,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { LOGGER.warn(".NET Standard 1.3 support has been DEPRECATED in this generator. Please use `csharp-netcore` generator instead."); additionalProperties.put(MCS_NET_VERSION_KEY, "4.6-api"); if (additionalProperties.containsKey("supportsUWP")) { - LOGGER.warn(".NET " + NETSTANDARD + " generator does not support UWP."); + LOGGER.warn(".NET {} generator does not support UWP.", NETSTANDARD); additionalProperties.remove("supportsUWP"); } @@ -332,7 +332,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { } else if (NET40.equals(this.targetFramework)) { additionalProperties.put(MCS_NET_VERSION_KEY, "4"); if (additionalProperties.containsKey(CodegenConstants.SUPPORTS_ASYNC)) { - LOGGER.warn(".NET " + NET40 + " generator does not support async."); + LOGGER.warn(".NET {} generator does not support async.", NET40); additionalProperties.remove(CodegenConstants.SUPPORTS_ASYNC); } @@ -350,13 +350,13 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { if (additionalProperties.containsKey(CodegenConstants.GENERATE_PROPERTY_CHANGED)) { if (NET35.equals(targetFramework)) { - LOGGER.warn(CodegenConstants.GENERATE_PROPERTY_CHANGED + " is only supported by generated code for .NET 4+."); + LOGGER.warn("{} is only supported by generated code for .NET 4+.", CodegenConstants.GENERATE_PROPERTY_CHANGED); additionalProperties.remove(CodegenConstants.GENERATE_PROPERTY_CHANGED); } else if (NETSTANDARD.equals(targetFramework)) { - LOGGER.warn(CodegenConstants.GENERATE_PROPERTY_CHANGED + " is not supported in .NET Standard generated code."); + LOGGER.warn("{} is not supported in .NET Standard generated code.", CodegenConstants.GENERATE_PROPERTY_CHANGED); additionalProperties.remove(CodegenConstants.GENERATE_PROPERTY_CHANGED); } else if (Boolean.TRUE.equals(netCoreProjectFileFlag)) { - LOGGER.warn(CodegenConstants.GENERATE_PROPERTY_CHANGED + " is not supported in .NET Core csproj project format."); + LOGGER.warn("{} is not supported in .NET Core csproj project format.", CodegenConstants.GENERATE_PROPERTY_CHANGED); additionalProperties.remove(CodegenConstants.GENERATE_PROPERTY_CHANGED); } else { setGeneratePropertyChanged(convertPropertyToBooleanAndWriteBack(CodegenConstants.GENERATE_PROPERTY_CHANGED)); @@ -714,7 +714,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { public void setTargetFramework(String dotnetFramework) { if (!frameworks.containsKey(dotnetFramework)) { - LOGGER.warn("Invalid .NET framework version, defaulting to " + this.targetFramework); + LOGGER.warn("Invalid .NET framework version, defaulting to {}", this.targetFramework); } else { this.targetFramework = dotnetFramework; } @@ -758,7 +758,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { break; } - LOGGER.info("Generating code for .NET Framework " + this.targetFramework); + LOGGER.info("Generating code for .NET Framework {}", this.targetFramework); } private CodegenModel reconcileInlineEnums(CodegenModel codegenModel, CodegenModel parentCodegenModel) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java index 74db8d4ca2d..a99243ab359 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java @@ -268,7 +268,7 @@ public class CSharpNancyFXServerCodegen extends AbstractCSharpCodegen { } private void postProcessParentModels(final Map models) { - LOGGER.debug("Processing parents: " + parentModels); + LOGGER.debug("Processing parents: {}", parentModels); for (final String parent : parentModels) { final CodegenModel parentModel = ModelUtils.getModelByName(parent, models); if (parentModel != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 356c6a895b0..2b0a5fe068d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -639,7 +639,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { } if (additionalProperties.containsKey(CodegenConstants.GENERATE_PROPERTY_CHANGED)) { - LOGGER.warn(CodegenConstants.GENERATE_PROPERTY_CHANGED + " is not supported in the .NET Standard generator."); + LOGGER.warn("{} is not supported in the .NET Standard generator.", CodegenConstants.GENERATE_PROPERTY_CHANGED); additionalProperties.remove(CodegenConstants.GENERATE_PROPERTY_CHANGED); } @@ -789,7 +789,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { } else { this.targetFramework = dotnetFramework; } - LOGGER.info("Generating code for .NET Framework " + this.targetFramework); + LOGGER.info("Generating code for .NET Framework {}", this.targetFramework); } public void setTargetFramework(List strategies) { @@ -804,7 +804,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { } this.targetFramework = strategies.stream().map(p -> p.name) .collect(Collectors.joining(";")); - LOGGER.info("Generating code for .NET Framework " + this.targetFramework); + LOGGER.info("Generating code for .NET Framework {}", this.targetFramework); } public void setTestTargetFramework(String testTargetFramework) { @@ -1026,7 +1026,8 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { properties.put(NET_STANDARD, this.isNetStandard); if (properties.containsKey(SUPPORTS_UWP)) { - LOGGER.warn(".NET " + this.name + " generator does not support the UWP option. Use the csharp generator instead."); + LOGGER.warn(".NET {} generator does not support the UWP option. Use the csharp generator instead.", + this.name); properties.remove(SUPPORTS_UWP); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java index c092a8b5acd..65083f70694 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java @@ -363,13 +363,14 @@ public class CrystalClientCodegen extends DefaultCodegen { // model name cannot use reserved keyword, e.g. return if (isReservedWord(modelName)) { modelName = camelize("Model" + modelName); - LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + modelName); + LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, modelName); return modelName; } // model name starts with number if (modelName.matches("^\\d.*")) { - LOGGER.warn(modelName + " (model name starts with number) cannot be used as model name. Renamed to " + camelize("model_" + modelName)); + LOGGER.warn("{} (model name starts with number) cannot be used as model name. Renamed to {}", modelName, + camelize("model_" + modelName)); modelName = "model_" + modelName; // e.g. 200Response => Model200Response (after camelize) } @@ -482,20 +483,20 @@ public class CrystalClientCodegen extends DefaultCodegen { // rename to empty_method_name_1 (e.g.) if method name is empty if (StringUtils.isEmpty(operationId)) { operationId = underscore("empty_method_name_" + emptyMethodNameCounter++); - LOGGER.warn("Empty method name (operationId) found. Renamed to " + operationId); + LOGGER.warn("Empty method name (operationId) found. Renamed to {}", operationId); return operationId; } // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { String newOperationId = underscore("call_" + operationId); - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } // operationId starts with a number if (operationId.matches("^\\d.*")) { - LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId))); + LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, underscore(sanitizeName("call_" + operationId))); operationId = "call_" + operationId; } @@ -881,7 +882,7 @@ public class CrystalClientCodegen extends DefaultCodegen { } LOGGER.error("Error running the command ({}). Exit value: {}, Error output: {}", command, exitValue, sb.toString()); } else { - LOGGER.info("Successfully executed: " + command); + LOGGER.info("Successfully executed: {}", command); } } catch (InterruptedException | IOException e) { LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index 51ce18efe45..78c1235c9df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -449,13 +449,14 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig // model name cannot use reserved keyword, e.g. return if (isReservedWord(name)) { - LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + ("model_" + name)); + LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, "model_" + name); name = "model_" + name; // e.g. return => ModelReturn (after camelize) } // model name starts with number if (name.matches("^\\d.*")) { - LOGGER.warn(name + " (model name starts with number) cannot be used as model name. Renamed to " + ("model_" + name)); + LOGGER.warn("{} (model name starts with number) cannot be used as model name. Renamed to {}", name, + "model_" + name); name = "model_" + name; // e.g. 200Response => Model200Response (after camelize) } @@ -471,13 +472,13 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId))); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, underscore(sanitizeName("call_" + operationId))); return underscore(sanitizeName("call_" + operationId)); } // operationId starts with a number if (operationId.matches("^\\d.*")) { - LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId))); + LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, underscore(sanitizeName("call_" + operationId))); operationId = "call_" + operationId; } @@ -602,7 +603,7 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig return code; } - LOGGER.warn("Unknown HTTP status code: " + this.code); + LOGGER.warn("Unknown HTTP status code: {}", this.code); return "\"" + code + "\""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index e7aaf1a3695..ba89d67819c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -188,7 +188,7 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { String newOperationId = camelize("call_" + operationId, true); - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java index 00013976a9b..231d1136b77 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java @@ -300,7 +300,7 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig public String toOperationId(String operationId) { // method name cannot use reserved keyword, e.g. if if (isReservedWord(operationId)) { - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId)).replaceAll("\\.", "_")); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, underscore(sanitizeName("call_" + operationId)).replaceAll("\\.", "_")); operationId = "call_" + operationId; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java index 9e9c1186a25..40947a5e958 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java @@ -359,7 +359,7 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig public String toOperationId(String operationId) { // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId)).replaceAll("\\.", "_")); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, underscore(sanitizeName("call_" + operationId)).replaceAll("\\.", "_")); operationId = "call_" + operationId; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java index 117a8aed937..b1cda784a5a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java @@ -256,7 +256,7 @@ public class ErlangServerCodegen extends DefaultCodegen implements CodegenConfig public String toOperationId(String operationId) { // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + camelize(sanitizeName("call_" + operationId))); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, camelize(sanitizeName("call_" + operationId))); operationId = "call_" + operationId; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java index 89a5a2ae69a..8f2d6ce052e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java @@ -327,7 +327,7 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig // model name cannot use reserved keyword, e.g. return if (isReservedWord(name)) { - LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + camelize("model_" + name)); + LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, camelize("model_" + name)); name = "model_" + name; // e.g. return => ModelReturn (after camelize) } @@ -377,7 +377,7 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId))); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, underscore(sanitizeName("call_" + operationId))); operationId = "call_" + operationId; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java index b62591c1d0e..3764f2c4b72 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java @@ -262,7 +262,7 @@ public class FsharpGiraffeServerCodegen extends AbstractFSharpCodegen { String original = operation.path; operation.path = operation.path.replace("?", "/"); if (!original.equals(operation.path)) { - LOGGER.warn("Normalized " + original + " to " + operation.path + ". Please verify generated source."); + LOGGER.warn("Normalized {} to {}. Please verify generated source.", original, operation.path); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index 8b264bf325f..497634d1d9f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -655,8 +655,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC Schema additionalProperties2 = getAdditionalProperties(p); String type = additionalProperties2.getType(); if (null == type) { - LOGGER.error("No Type defined for Additional Schema " + additionalProperties2 + "\n" // - + "\tIn Schema: " + p); + LOGGER.error("No Type defined for Additional Schema {}\n\tIn Schema: {}", additionalProperties2, p); } String inner = getSchemaType(additionalProperties2); return "(Map.Map Text " + inner + ")"; @@ -693,7 +692,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC counter++; } if (!op.operationId.equals(uniqueName)) { - LOGGER.warn("generated unique operationId `" + uniqueName + "`"); + LOGGER.warn("generated unique operationId `{}`", uniqueName); } op.operationId = uniqueName; op.operationIdLowerCase = uniqueName.toLowerCase(Locale.ROOT); @@ -1455,7 +1454,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC if (exitValue != 0) { LOGGER.error("Error running the command ({}). Exit value: {}", command, exitValue); } else { - LOGGER.info("Successfully executed: " + command); + LOGGER.info("Successfully executed: {}", command); } } catch (InterruptedException | IOException e) { LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java index cefd7cebde8..e19e4d024a2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java @@ -388,7 +388,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf @Override public String getSchemaType(Schema p) { String schemaType = super.getSchemaType(p); - LOGGER.debug("debugging OpenAPI type: " + p.getType() + ", " + p.getFormat() + " => " + schemaType); + LOGGER.debug("debugging OpenAPI type: {}, {} => {}", p.getType(), p.getFormat(), schemaType); String type = null; if (typeMapping.containsKey(schemaType)) { type = typeMapping.get(schemaType); @@ -411,8 +411,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf Schema additionalProperties2 = getAdditionalProperties(p); String type = additionalProperties2.getType(); if (null == type) { - LOGGER.error("No Type defined for Additional Property " + additionalProperties2 + "\n" // - + "\tIn Property: " + p); + LOGGER.error("No Type defined for Additional Property {}\n\tIn Property: {}", additionalProperties2, p); } String inner = getSchemaType(additionalProperties2); return "(Map.Map Text " + inner + ")"; @@ -692,7 +691,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf if (exitValue != 0) { LOGGER.error("Error running the command ({}). Exit value: {}", command, exitValue); } else { - LOGGER.info("Successfully executed: " + command); + LOGGER.info("Successfully executed: {}", command); } } catch (InterruptedException | IOException e) { LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index f82aba5b284..4fa28b3cb5f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -468,7 +468,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen } else if (REST_ASSURED.equals(getLibrary())) { if (getSerializationLibrary() == null) { - LOGGER.info("No serializationLibrary configured, using '" + SERIALIZATION_LIBRARY_GSON + "' as fallback"); + LOGGER.info("No serializationLibrary configured, using '{}' as fallback", SERIALIZATION_LIBRARY_GSON); setSerializationLibrary(SERIALIZATION_LIBRARY_GSON); } if (SERIALIZATION_LIBRARY_JACKSON.equals(getSerializationLibrary())) { @@ -496,7 +496,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen supportingFiles.add(new SupportingFile("kumuluzee.beans.xml.mustache", "src/main/resources/META-INF", "beans.xml")); } } else { - LOGGER.error("Unknown library option (-l/--library): " + getLibrary()); + LOGGER.error("Unknown library option (-l/--library): {}", getLibrary()); } if (usePlayWS) { @@ -553,7 +553,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen } if (getSerializationLibrary() == null) { - LOGGER.info("No serializationLibrary configured, using '" + SERIALIZATION_LIBRARY_GSON + "' as fallback"); + LOGGER.info("No serializationLibrary configured, using '{}' as fallback", SERIALIZATION_LIBRARY_GSON); setSerializationLibrary(SERIALIZATION_LIBRARY_GSON); } switch (getSerializationLibrary()) { @@ -997,7 +997,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen public void forceSerializationLibrary(String serializationLibrary) { if ((this.serializationLibrary != null) && !this.serializationLibrary.equalsIgnoreCase(serializationLibrary)) { - LOGGER.warn("The configured serializationLibrary '" + this.serializationLibrary + "', is not supported by the library: '" + getLibrary() + "', switching back to: " + serializationLibrary); + LOGGER.warn( + "The configured serializationLibrary '{}', is not supported by the library: '{}', switching back to: {}", + this.serializationLibrary, getLibrary(), serializationLibrary); } setSerializationLibrary(serializationLibrary); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java index 058d544f52a..3023ff6ab2e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java @@ -528,14 +528,15 @@ public class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod // model name cannot use reserved keyword, e.g. return if (isReservedWord(name)) { String modelName = "Model" + name; - LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + modelName); + LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, modelName); return modelName; } // model name starts with number if (name.matches("^\\d.*")) { String modelName = "Model" + name; // e.g. 200Response => Model200Response (after camelize) - LOGGER.warn(name + " (model name starts with number) cannot be used as model name. Renamed to " + modelName); + LOGGER.warn("{} (model name starts with number) cannot be used as model name. Renamed to {}", name, + modelName); return modelName; } @@ -780,7 +781,7 @@ public class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod type = openAPIType; } if (null == type) { - LOGGER.error("No Type defined for Schema " + p); + LOGGER.error("No Type defined for Schema {}", p); } return toModelName(type); } @@ -797,14 +798,14 @@ public class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { String newOperationId = camelize("call_" + operationId, true); - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } // operationId starts with a number if (operationId.matches("^\\d.*")) { String newOperationId = camelize("call_" + operationId, true); - LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } @@ -1134,7 +1135,7 @@ public class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod if (exitValue != 0) { LOGGER.error("Error running the command ({}). Exit code: {}", command, exitValue); } - LOGGER.info("Successfully executed: " + command); + LOGGER.info("Successfully executed: {}", command); } catch (InterruptedException | IOException e) { LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); // Restore interrupted state diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index 2f7a34e1818..71a93675a0d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -584,14 +584,15 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo // model name cannot use reserved keyword, e.g. return if (isReservedWord(name)) { String modelName = "Model" + name; - LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + modelName); + LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, modelName); return modelName; } // model name starts with number if (name.matches("^\\d.*")) { String modelName = "Model" + name; // e.g. 200Response => Model200Response (after camelize) - LOGGER.warn(name + " (model name starts with number) cannot be used as model name. Renamed to " + modelName); + LOGGER.warn("{} (model name starts with number) cannot be used as model name. Renamed to {}", name, + modelName); return modelName; } @@ -836,7 +837,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo type = openAPIType; } if (null == type) { - LOGGER.error("No Type defined for Schema " + p); + LOGGER.error("No Type defined for Schema {}", p); } return toModelName(type); } @@ -853,14 +854,14 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { String newOperationId = camelize("call_" + operationId, true); - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } // operationId starts with a number if (operationId.matches("^\\d.*")) { String newOperationId = camelize("call_" + operationId, true); - LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } @@ -1219,7 +1220,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo if (exitValue != 0) { LOGGER.error("Error running the command ({}). Exit code: {}", command, exitValue); } - LOGGER.info("Successfully executed: " + command); + LOGGER.info("Successfully executed: {}", command); } catch (InterruptedException | IOException e) { LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); // Restore interrupted state diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java index 751d75e4f21..5b8bf164a60 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java @@ -203,7 +203,7 @@ public class JavascriptClosureAngularClientCodegen extends DefaultCodegen implem // model name cannot use reserved keyword, e.g. return if (isReservedWord(name)) { - LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + camelize("model_" + name)); + LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, camelize("model_" + name)); name = "model_" + name; // e.g. return => ModelReturn (after camelize) } @@ -298,7 +298,7 @@ public class JavascriptClosureAngularClientCodegen extends DefaultCodegen implem // method name cannot use reserved keyword, e.g. return if (isReservedWord(operationId)) { String newOperationId = camelize("call_" + operationId, true); - LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + newOperationId); + LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId); return newOperationId; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java index 0c182417c94..c5063d99185 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java @@ -189,7 +189,7 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen { if (StringUtils.isEmpty(library)) { this.setLibrary(DEFAULT_LIBRARY); additionalProperties.put(CodegenConstants.LIBRARY, DEFAULT_LIBRARY); - LOGGER.info("`library` option is empty. Default to " + DEFAULT_LIBRARY); + LOGGER.info("`library` option is empty. Default to {}", DEFAULT_LIBRARY); } if (additionalProperties.containsKey(Constants.AUTOMATIC_HEAD_REQUESTS)) {