Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,14 @@ public String toModelName(final String name) {
// model name cannot use reserved keyword, e.g. return
if (isReservedWord(camelizedName)) {
final String modelName = "Model" + camelizedName;
LOGGER.warn(camelizedName + " (reserved word) cannot be used as model name. Renamed to " + modelName);
LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", camelizedName, modelName);
return modelName;
}

// model name starts with number
if (camelizedName.matches("^\\d.*")) {
final String modelName = "Model" + camelizedName; // 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;
}

Expand Down Expand Up @@ -471,7 +471,7 @@ public String getTypeDeclaration(Schema p) {
public String getSchemaType(Schema p) {
String openAPIType = super.getSchemaType(p);
if (openAPIType == null) {
LOGGER.error("No Type defined for Schema " + p);
LOGGER.error("No Type defined for Schema {}", p);
}
if (typeMapping.containsKey(openAPIType)) {
return typeMapping.get(openAPIType);
Expand Down Expand Up @@ -601,13 +601,13 @@ public String toOperationId(String operationId) {
// 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.*")) {
LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + camelize("call_" + operationId), true);
LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, camelize("call_" + operationId), true);
operationId = camelize("call_" + operationId, true);
}

Expand Down