Skip to content

Commit

Permalink
Merge pull request #8246 from bigtlb/issue-8218
Browse files Browse the repository at this point in the history
Fixed DefaultGenerator.getHandleBars to not use a regex string for the templateDir
  • Loading branch information
HugoMario committed Jun 7, 2018
2 parents 9444f12 + 7ee934c commit f536de5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ private Map<String, SecurityScheme> getAuthMethods(List<SecurityRequirement> sec

private com.github.jknack.handlebars.Template getHandlebars(String templateFile) throws IOException {
if (templateFile.startsWith(config.templateDir())) {
templateFile = templateFile.replaceFirst(config.templateDir(), StringUtils.EMPTY);
templateFile = StringUtils.replaceOnce(templateFile, config.templateDir(), StringUtils.EMPTY);
}
TemplateLoader templateLoader = null;
if (config.additionalProperties().get(CodegenConstants.TEMPLATE_DIR) != null) {
Expand Down

0 comments on commit f536de5

Please sign in to comment.