@@ -708,9 +708,7 @@ private void generateSupportingFiles(List<File> files, Map<String, Object> bundl
708
708
}
709
709
710
710
if (ignoreProcessor .allowsFile (new File (outputFilename ))) {
711
- if (Arrays .stream (templatingEngine .getFileExtensions ())
712
- .anyMatch (templateFile ::endsWith )) {
713
- configPostProcessMustacheCompiler ();
711
+ if (Arrays .stream (templatingEngine .getFileExtensions ()).anyMatch (templateFile ::endsWith )) {
714
712
String templateContent = templatingEngine .compileTemplate (this , bundle , support .templateFile );
715
713
writeToFile (outputFilename , templateContent );
716
714
File written = new File (outputFilename );
@@ -890,6 +888,9 @@ public List<File> generate() {
890
888
configureGeneratorProperties ();
891
889
configureOpenAPIInfo ();
892
890
891
+ // If the template adapter is mustache, we'll set the config-modified Compiler.
892
+ configPostProcessMustacheCompiler ();
893
+
893
894
List <File > files = new ArrayList <File >();
894
895
// models
895
896
List <String > filteredSchemas = ModelUtils .getSchemasUsedOnlyInFormParam (openAPI );
@@ -918,7 +919,6 @@ public String getFullTemplateContents(String templateName) {
918
919
protected File processTemplateToFile (Map <String , Object > templateData , String templateName , String outputFilename ) throws IOException {
919
920
String adjustedOutputFilename = outputFilename .replaceAll ("//" , "/" ).replace ('/' , File .separatorChar );
920
921
if (ignoreProcessor .allowsFile (new File (adjustedOutputFilename ))) {
921
- configPostProcessMustacheCompiler ();
922
922
String templateContent = templatingEngine .compileTemplate (this , templateData , templateName );
923
923
writeToFile (adjustedOutputFilename , templateContent );
924
924
return new File (adjustedOutputFilename );
0 commit comments