Skip to content

Commit 1149e58

Browse files
authored
Merge pull request #644 from swagger-api/codegen-issue-10107
fixed custom templates location for nodejs generator
2 parents 9e4645f + 6c2cea2 commit 1149e58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/io/swagger/codegen/v3/generators/nodejs/NodeJSServerCodegen.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ public void processOpts() {
288288
* Template Location. This is the location which templates will be read from. The generator
289289
* will use the resource stream to attempt to read the templates.
290290
*/
291-
embeddedTemplateDir = templateDir = getTemplateDir();
291+
if (StringUtils.isBlank(templateDir)) {
292+
embeddedTemplateDir = templateDir = getTemplateDir();
293+
}
292294

293295
if (additionalProperties.containsKey(GOOGLE_CLOUD_FUNCTIONS)) {
294296
setGoogleCloudFunctions(

0 commit comments

Comments
 (0)