forked from loafle/openapi-generator-original
Compare commits
1 Commits
master
...
skip-form-
Author | SHA1 | Date | |
---|---|---|---|
|
2f235f0854 |
@ -466,7 +466,7 @@ public class DefaultGenerator implements Generator {
|
|||||||
|
|
||||||
Boolean skipFormModel = GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL) != null ?
|
Boolean skipFormModel = GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL) != null ?
|
||||||
Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL)) :
|
Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL)) :
|
||||||
getGeneratorPropertyDefaultSwitch(CodegenConstants.SKIP_FORM_MODEL, true);
|
getGeneratorPropertyDefaultSwitch(CodegenConstants.SKIP_FORM_MODEL, false);
|
||||||
|
|
||||||
// process models only
|
// process models only
|
||||||
for (String name : modelKeys) {
|
for (String name : modelKeys) {
|
||||||
@ -488,9 +488,9 @@ public class DefaultGenerator implements Generator {
|
|||||||
if (unusedModels.contains(name)) {
|
if (unusedModels.contains(name)) {
|
||||||
if (Boolean.FALSE.equals(skipFormModel)) {
|
if (Boolean.FALSE.equals(skipFormModel)) {
|
||||||
// if skipFormModel sets to true, still generate the model and log the result
|
// 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 {
|
} 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.
|
// TODO: Should this be added to dryRun? If not, this seems like a weird place to return early from processing.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user