fix typo with camelUseDefaultValidationtErrorProcessor (#11728)

This commit is contained in:
William Cheng 2022-02-26 14:51:02 +08:00 committed by GitHub
parent 5c673d89c4
commit 4d6b733d91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -12,6 +12,6 @@ additionalProperties:
library: "spring-boot"
withXml: true
jackson: true
camelUseDefaulValidationtErrorProcessor: true
camelUseDefaultValidationtErrorProcessor: true
camelRestClientRequestValidation: true
camelSecurityDefinitions: true

View File

@ -37,7 +37,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|camelRestClientRequestValidation|enable validation of the client request to check whether the Content-Type and Accept headers from the client is supported by the Rest-DSL configuration| |false|
|camelRestComponent|name of the Camel component to use as the REST consumer| |servlet|
|camelSecurityDefinitions|generate camel security definitions| |true|
|camelUseDefaulValidationtErrorProcessor|generate default validation error processor| |true|
|camelUseDefaultValidationtErrorProcessor|generate default validation error processor| |true|
|camelValidationErrorProcessor|validation error processor bean name| |validationErrorProcessor|
|configPackage|configuration package for generated code| |org.openapitools.configuration|
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|

View File

@ -42,10 +42,10 @@
<camelDataformatProperties>json.out.disableFeatures=WRITE_DATES_AS_TIMESTAMPS</camelDataformatProperties>
<withXml>true</withXml>
<jackson>true</jackson>
<camelUseDefaulValidationtErrorProcessor>true</camelUseDefaulValidationtErrorProcessor>
<camelUseDefaultValidationtErrorProcessor>true</camelUseDefaultValidationtErrorProcessor>
<!--
Define bean validation error processor
<camelUseDefaulValidationtErrorProcessor>false</camelUseDefaulValidationtErrorProcessor>
<camelUseDefaultValidationtErrorProcessor>false</camelUseDefaultValidationtErrorProcessor>
<camelValidationErrorProcessor>errorProcessorBeanName</camelValidationErrorProcessor>
-->
<camelRestClientRequestValidation>true</camelRestClientRequestValidation>

View File

@ -43,7 +43,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat
public static final String CAMEL_REST_COMPONENT = "camelRestComponent";
public static final String CAMEL_REST_BINDING_MODE = "camelRestBindingMode";
public static final String CAMEL_REST_CLIENT_REQUEST_VALIDATION = "camelRestClientRequestValidation";
public static final String CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR = "camelUseDefaulValidationtErrorProcessor";
public static final String CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR = "camelUseDefaultValidationtErrorProcessor";
public static final String CAMEL_VALIDATION_ERROR_PROCESSOR = "camelValidationErrorProcessor";
public static final String CAMEL_SECURITY_DEFINITIONS = "camelSecurityDefinitions";
public static final String CAMEL_DATAFORMAT_PROPERTIES = "camelDataformatProperties";
@ -51,7 +51,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat
private String camelRestComponent = "servlet";
private String camelRestBindingMode = "auto";
private boolean camelRestClientRequestValidation = false;
private boolean camelUseDefaulValidationtErrorProcessor = true;
private boolean camelUseDefaultValidationtErrorProcessor = true;
private String camelValidationErrorProcessor = "validationErrorProcessor";
private boolean camelSecurityDefinitions = true;
private String camelDataformatProperties = "";
@ -109,7 +109,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat
"RestConfiguration.java"));
if (performBeanValidation) {
apiTemplateFiles.put("validation.mustache", "Validator.java");
if (camelUseDefaulValidationtErrorProcessor) {
if (camelUseDefaultValidationtErrorProcessor) {
supportingFiles.add(new SupportingFile("errorProcessor.mustache",
(sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator),
"ValidationErrorProcessor.java"));
@ -174,7 +174,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat
cliOptions.add(new CliOption(CAMEL_REST_COMPONENT, "name of the Camel component to use as the REST consumer").defaultValue(camelRestComponent));
cliOptions.add(new CliOption(CAMEL_REST_BINDING_MODE, "binding mode to be used by the REST consumer").defaultValue(camelRestBindingMode));
cliOptions.add(CliOption.newBoolean(CAMEL_REST_CLIENT_REQUEST_VALIDATION, "enable validation of the client request to check whether the Content-Type and Accept headers from the client is supported by the Rest-DSL configuration", camelRestClientRequestValidation));
cliOptions.add(CliOption.newBoolean(CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR, "generate default validation error processor", camelUseDefaulValidationtErrorProcessor));
cliOptions.add(CliOption.newBoolean(CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR, "generate default validation error processor", camelUseDefaultValidationtErrorProcessor));
cliOptions.add(new CliOption(CAMEL_VALIDATION_ERROR_PROCESSOR, "validation error processor bean name").defaultValue(camelValidationErrorProcessor));
cliOptions.add(CliOption.newBoolean(CAMEL_SECURITY_DEFINITIONS, "generate camel security definitions", camelSecurityDefinitions));
cliOptions.add(new CliOption(CAMEL_DATAFORMAT_PROPERTIES, "list of dataformat properties separated by comma (propertyName1=propertyValue2,...").defaultValue(camelDataformatProperties));
@ -184,7 +184,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat
camelRestComponent = manageAdditionalProperty(CAMEL_REST_COMPONENT, camelRestComponent);
camelRestBindingMode = manageAdditionalProperty(CAMEL_REST_BINDING_MODE, camelRestBindingMode);
camelRestClientRequestValidation = manageAdditionalProperty(CAMEL_REST_CLIENT_REQUEST_VALIDATION, camelRestClientRequestValidation);
camelUseDefaulValidationtErrorProcessor = manageAdditionalProperty(CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR, camelUseDefaulValidationtErrorProcessor);
camelUseDefaultValidationtErrorProcessor = manageAdditionalProperty(CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR, camelUseDefaultValidationtErrorProcessor);
camelValidationErrorProcessor = manageAdditionalProperty(CAMEL_VALIDATION_ERROR_PROCESSOR, camelValidationErrorProcessor);
camelSecurityDefinitions = manageAdditionalProperty(CAMEL_SECURITY_DEFINITIONS, camelSecurityDefinitions);
camelDataformatProperties = manageAdditionalProperty(CAMEL_DATAFORMAT_PROPERTIES, camelDataformatProperties);