File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
modules/swagger-codegen/src/main/java/io/swagger/codegen Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,17 @@ private String getHost() {
125
125
protected void configureGeneratorProperties () {
126
126
// allows generating only models by specifying a CSV of models to generate, or empty for all
127
127
// NOTE: Boolean.TRUE is required below rather than `true` because of JVM boxing constraints and type inference.
128
- isGenerateApis = System .getProperty (CodegenConstants .APIS ) != null ? Boolean .TRUE : getGeneratorPropertyDefaultSwitch (CodegenConstants .APIS , null );
129
- isGenerateModels = System .getProperty (CodegenConstants .MODELS ) != null ? Boolean .TRUE : getGeneratorPropertyDefaultSwitch (CodegenConstants .MODELS , null );
130
- isGenerateSupportingFiles = System .getProperty (CodegenConstants .SUPPORTING_FILES ) != null ? Boolean .TRUE : getGeneratorPropertyDefaultSwitch (CodegenConstants .SUPPORTING_FILES , null );
128
+ if (System .getProperty (CodegenConstants .GENERATE_APIS ) != null ) {
129
+ isGenerateApis = Boolean .valueOf (System .getProperty (CodegenConstants .GENERATE_APIS ));
130
+ } else {
131
+ isGenerateApis = System .getProperty (CodegenConstants .APIS ) != null ? Boolean .TRUE : getGeneratorPropertyDefaultSwitch (CodegenConstants .APIS , null );
132
+ }
133
+ if (System .getProperty (CodegenConstants .GENERATE_MODELS ) != null ) {
134
+ isGenerateModels = Boolean .valueOf (System .getProperty (CodegenConstants .GENERATE_MODELS ));
135
+ } else {
136
+ isGenerateModels = System .getProperty (CodegenConstants .MODELS ) != null ? Boolean .TRUE : getGeneratorPropertyDefaultSwitch (CodegenConstants .MODELS , null );
137
+ }
138
+ isGenerateSupportingFiles = System .getProperty (CodegenConstants .SUPPORTING_FILES ) != null ? Boolean .valueOf (System .getProperty (CodegenConstants .SUPPORTING_FILES )) : getGeneratorPropertyDefaultSwitch (CodegenConstants .SUPPORTING_FILES , null );
131
139
132
140
if (isGenerateApis == null && isGenerateModels == null && isGenerateSupportingFiles == null ) {
133
141
// no specifics are set, generate everything
You can’t perform that action at this time.
0 commit comments