Skip to content

Commit fe57363

Browse files
authored
Merge pull request #7540 from swagger-api/issue-7509
fixed path for template files on Windows OS.
2 parents e239af0 + a1247a6 commit fe57363

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,8 @@ private com.github.jknack.handlebars.Template getHandlebars(String templateFile)
10101010
final Handlebars handlebars = new Handlebars(templateLoader);
10111011
config.addHandlebarHelpers(handlebars);
10121012

1013-
return handlebars.compile(templateFile.replace(".mustache", StringUtils.EMPTY));
1013+
templateFile = templateFile.replace(".mustache", StringUtils.EMPTY).replace("\\", "/");
1014+
return handlebars.compile(templateFile);
10141015
}
10151016

10161017
private boolean isJavaCodegen(String name) {

0 commit comments

Comments
 (0)