Skip to content

Set skipFormModel to false by default #16567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ void generateModels(List<File> files, List<ModelMap> allModels, List<String> unu

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) {
Expand All @@ -488,9 +488,9 @@ void generateModels(List<File> files, List<ModelMap> allModels, List<String> unu
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;
}
Expand Down