add comments

This commit is contained in:
wing328
2016-01-19 19:50:27 +08:00
parent 8927c1dc0f
commit 61c717b6de
5 changed files with 11 additions and 24 deletions

View File

@@ -284,7 +284,7 @@ public class DefaultCodegen {
}
/**
* Return the file name of the Api
* Return the file name of the Api Test
*
* @param name the file name of the Api
* @return the file name of the Api
@@ -314,7 +314,7 @@ public class DefaultCodegen {
}
/**
* Return the capitalized file name of the model
* Return the capitalized file name of the model test
*
* @param name the model name
* @return the file name of the model
@@ -2071,6 +2071,14 @@ public class DefaultCodegen {
return apiFileFolder() + '/' + toApiFilename(tag) + suffix;
}
/**
* Return the full path and API test file
*
* @param templateName template name
* @param tag tag
*
* @return the API test file name with full path
*/
public String apiTestFilename(String templateName, String tag) {
String suffix = apiTestTemplateFiles().get(templateName);
return apiTestFileFolder() + '/' + toApiTestFilename(tag) + suffix;

View File

@@ -311,6 +311,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
files.add(new File(filename));
}
// to generate api test files
for (String templateName : config.apiTestTemplateFiles().keySet()) {
String filename = config.apiTestFilename(templateName, tag);
if (!config.shouldOverwrite(filename) && new File(filename).exists()) {