mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-18 18:19:17 +00:00
[generator] Cleanup debugOpenAPI usage/display text (#804)
This commit is contained in:
committed by
William Cheng
parent
08ca54d3d5
commit
7acba8a4d8
@@ -169,14 +169,15 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
if (!generateApiTests && !generateModelTests) {
|
||||
config.additionalProperties().put(CodegenConstants.EXCLUDE_TESTS, true);
|
||||
}
|
||||
// for backward compatibility
|
||||
if (System.getProperty("debugSwagger") != null) {
|
||||
LOGGER.info("Please use system property 'debugOpenAPI' instead of 'debugSwagger'.");
|
||||
Json.prettyPrint(openAPI);
|
||||
}
|
||||
|
||||
|
||||
if (System.getProperty("debugOpenAPI") != null) {
|
||||
Json.prettyPrint(openAPI);
|
||||
} else if (System.getProperty("debugSwagger") != null) {
|
||||
// This exists for backward compatibility
|
||||
// We fall to this block only if debugOpenAPI is null. No need to dump this twice.
|
||||
LOGGER.info("Please use system property 'debugOpenAPI' instead of 'debugSwagger'.");
|
||||
Json.prettyPrint(openAPI);
|
||||
}
|
||||
|
||||
config.processOpts();
|
||||
|
||||
@@ -596,12 +596,12 @@ public class CodegenConfigurator implements Serializable {
|
||||
return;
|
||||
}
|
||||
LOGGER.info("\nVERBOSE MODE: ON. Additional debug options are injected" +
|
||||
"\n - [debugSwagger] prints the openapi specification as interpreted by the codegen" +
|
||||
"\n - [debugOpenAPI] prints the OpenAPI specification as interpreted by the codegen" +
|
||||
"\n - [debugModels] prints models passed to the template engine" +
|
||||
"\n - [debugOperations] prints operations passed to the template engine" +
|
||||
"\n - [debugSupportingFiles] prints additional data passed to the template engine");
|
||||
|
||||
System.setProperty("debugSwagger", "");
|
||||
System.setProperty("debugOpenAPI", "");
|
||||
System.setProperty("debugModels", "");
|
||||
System.setProperty("debugOperations", "");
|
||||
System.setProperty("debugSupportingFiles", "");
|
||||
|
||||
Reference in New Issue
Block a user