log message for writeOptional, better handling of model name for php

This commit is contained in:
wing328 2016-02-25 14:37:21 +08:00
parent 6962947611
commit 7b42624a86
2 changed files with 3 additions and 0 deletions

View File

@ -2279,6 +2279,8 @@ public class DefaultCodegen {
} }
if(!new File(folder).exists()) { if(!new File(folder).exists()) {
supportingFiles.add(supportingFile); supportingFiles.add(supportingFile);
} else {
LOGGER.info("Skipped overwriting " + supportingFile.destinationFilename + " as the file already exists in " + folder);
} }
} }

View File

@ -366,6 +366,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
// model name cannot use reserved keyword // model name cannot use reserved keyword
if (reservedWords.contains(name)) { if (reservedWords.contains(name)) {
LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + camelize("object_" + name));
name = "object_" + name; // e.g. return => ObjectReturn (after camelize) name = "object_" + name; // e.g. return => ObjectReturn (after camelize)
} }