fix(RustServerCodegen): fix reserved word model rename log message (#10418)

This commit is contained in:
Pi Delport
2021-09-19 05:49:35 +02:00
committed by GitHub
parent 2bd20a08de
commit 10288397f9

View File

@@ -395,8 +395,9 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
// model name cannot use reserved keyword, e.g. return
if (isReservedWord(camelizedName)) {
camelizedName = "Model" + camelizedName;
LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", camelizedName, camelizedName);
final String modelName = "Model" + camelizedName;
LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", camelizedName, modelName);
return modelName;
}
// model name starts with number