[core] Add back functionality to debug openapi spec, accidentally removed in 4.1.2 (#5147)

This commit is contained in:
Jim Schubert
2020-01-29 08:30:20 -05:00
committed by GitHub
parent 6cf58afdc5
commit 76e8e81668

View File

@@ -186,12 +186,12 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
}
if (GlobalSettings.getProperty("debugOpenAPI") != null) {
SerializerUtils.toJsonString(openAPI);
System.out.println(SerializerUtils.toJsonString(openAPI));
} else if (GlobalSettings.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'.");
SerializerUtils.toJsonString(openAPI);
System.out.println(SerializerUtils.toJsonString(openAPI));
}
config.processOpts();