Skip to content

Commit 6c2cea2

Browse files
committed
fixed custom templates location for nodejs generator
1 parent 9e4645f commit 6c2cea2

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)