mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
set skipFormModel to false by default
This commit is contained in:
parent
d6695056fe
commit
2f235f0854
@ -466,7 +466,7 @@ public class DefaultGenerator implements Generator {
|
||||
|
||||
Boolean skipFormModel = GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL) != null ?
|
||||
Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL)) :
|
||||
getGeneratorPropertyDefaultSwitch(CodegenConstants.SKIP_FORM_MODEL, true);
|
||||
getGeneratorPropertyDefaultSwitch(CodegenConstants.SKIP_FORM_MODEL, false);
|
||||
|
||||
// process models only
|
||||
for (String name : modelKeys) {
|
||||
@ -488,9 +488,9 @@ public class DefaultGenerator implements Generator {
|
||||
if (unusedModels.contains(name)) {
|
||||
if (Boolean.FALSE.equals(skipFormModel)) {
|
||||
// if skipFormModel sets to true, still generate the model and log the result
|
||||
LOGGER.info("Model {} (marked as unused due to form parameters) is generated due to the global property `skipFormModel` set to false", name);
|
||||
LOGGER.info("Model {} (marked as unused due to form parameters) is generated due to the global property `skipFormModel` set to false (default)", name);
|
||||
} else {
|
||||
LOGGER.info("Model {} not generated since it's marked as unused (due to form parameters) and `skipFormModel` (global property) set to true (default)", name);
|
||||
LOGGER.info("Model {} not generated since it's marked as unused (due to form parameters) and `skipFormModel` (global property) set to true", name);
|
||||
// TODO: Should this be added to dryRun? If not, this seems like a weird place to return early from processing.
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user