File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main
java/org/openapitools/codegen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,14 +169,15 @@ private void configureGeneratorProperties() {
169169 if (!generateApiTests && !generateModelTests ) {
170170 config .additionalProperties ().put (CodegenConstants .EXCLUDE_TESTS , true );
171171 }
172- // for backward compatibility
173- if (System .getProperty ("debugSwagger" ) != null ) {
174- LOGGER .info ("Please use system property 'debugOpenAPI' instead of 'debugSwagger'." );
175- Json .prettyPrint (openAPI );
176- }
172+
177173
178174 if (System .getProperty ("debugOpenAPI" ) != null ) {
179175 Json .prettyPrint (openAPI );
176+ } else if (System .getProperty ("debugSwagger" ) != null ) {
177+ // This exists for backward compatibility
178+ // We fall to this block only if debugOpenAPI is null. No need to dump this twice.
179+ LOGGER .info ("Please use system property 'debugOpenAPI' instead of 'debugSwagger'." );
180+ Json .prettyPrint (openAPI );
180181 }
181182
182183 config .processOpts ();
Original file line number Diff line number Diff line change @@ -596,12 +596,12 @@ private void setVerboseFlags() {
596596 return ;
597597 }
598598 LOGGER .info ("\n VERBOSE MODE: ON. Additional debug options are injected" +
599- "\n - [debugSwagger ] prints the openapi specification as interpreted by the codegen" +
599+ "\n - [debugOpenAPI ] prints the OpenAPI specification as interpreted by the codegen" +
600600 "\n - [debugModels] prints models passed to the template engine" +
601601 "\n - [debugOperations] prints operations passed to the template engine" +
602602 "\n - [debugSupportingFiles] prints additional data passed to the template engine" );
603603
604- System .setProperty ("debugSwagger " , "" );
604+ System .setProperty ("debugOpenAPI " , "" );
605605 System .setProperty ("debugModels" , "" );
606606 System .setProperty ("debugOperations" , "" );
607607 System .setProperty ("debugSupportingFiles" , "" );
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ the object you have available during client generation:
6262
6363```
6464# The following additional debug options are available for all codegen targets:
65- # -DdebugSwagger prints the OpenAPI Specification as interpreted by the codegen
65+ # -DdebugOpenAPI prints the OpenAPI Specification as interpreted by the codegen
6666# -DdebugModels prints models passed to the template engine
6767# -DdebugOperations prints operations passed to the template engine
6868# -DdebugSupportingFiles prints additional data passed to the template engine
You can’t perform that action at this time.
0 commit comments