forked from loafle/openapi-generator-original
add comments
This commit is contained in:
@@ -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
|
||||
@@ -2093,6 +2093,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;
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user