@@ -135,7 +135,12 @@ protected void configureGeneratorProperties() {
135
135
} else {
136
136
isGenerateModels = System .getProperty (CodegenConstants .MODELS ) != null ? Boolean .TRUE : getGeneratorPropertyDefaultSwitch (CodegenConstants .MODELS , null );
137
137
}
138
- isGenerateSupportingFiles = System .getProperty (CodegenConstants .SUPPORTING_FILES ) != null ? Boolean .valueOf (System .getProperty (CodegenConstants .SUPPORTING_FILES )) : getGeneratorPropertyDefaultSwitch (CodegenConstants .SUPPORTING_FILES , null );
138
+ String supportingFilesProperty = System .getProperty (CodegenConstants .SUPPORTING_FILES );
139
+ if (((supportingFilesProperty != null ) && supportingFilesProperty .equalsIgnoreCase ("false" ))) {
140
+ isGenerateSupportingFiles = false ;
141
+ } else {
142
+ isGenerateSupportingFiles = supportingFilesProperty != null ? Boolean .TRUE : getGeneratorPropertyDefaultSwitch (CodegenConstants .SUPPORTING_FILES , null );
143
+ }
139
144
140
145
if (isGenerateApis == null && isGenerateModels == null && isGenerateSupportingFiles == null ) {
141
146
// no specifics are set, generate everything
@@ -568,7 +573,10 @@ protected void generateSupportingFiles(List<File> files, Map<String, Object> bun
568
573
}
569
574
Set <String > supportingFilesToGenerate = null ;
570
575
String supportingFiles = System .getProperty (CodegenConstants .SUPPORTING_FILES );
571
- if (supportingFiles != null && !supportingFiles .isEmpty ()) {
576
+ boolean generateAll = false ;
577
+ if (supportingFiles != null && supportingFiles .equalsIgnoreCase ("true" )) {
578
+ generateAll = true ;
579
+ } else if (supportingFiles != null && !supportingFiles .isEmpty ()) {
572
580
supportingFilesToGenerate = new HashSet <String >(Arrays .asList (supportingFiles .split ("," )));
573
581
}
574
582
@@ -594,7 +602,7 @@ protected void generateSupportingFiles(List<File> files, Map<String, Object> bun
594
602
templateFile = getFullTemplateFile (config , support .templateFile );
595
603
}
596
604
boolean shouldGenerate = true ;
597
- if (supportingFilesToGenerate != null && !supportingFilesToGenerate .isEmpty ()) {
605
+ if (! generateAll && supportingFilesToGenerate != null && !supportingFilesToGenerate .isEmpty ()) {
598
606
shouldGenerate = supportingFilesToGenerate .contains (support .destinationFilename );
599
607
}
600
608
if (!shouldGenerate ) {
0 commit comments