forked from loafle/openapi-generator-original
fix typo with camelUseDefaultValidationtErrorProcessor (#11728)
This commit is contained in:
parent
5c673d89c4
commit
4d6b733d91
@ -12,6 +12,6 @@ additionalProperties:
|
|||||||
library: "spring-boot"
|
library: "spring-boot"
|
||||||
withXml: true
|
withXml: true
|
||||||
jackson: true
|
jackson: true
|
||||||
camelUseDefaulValidationtErrorProcessor: true
|
camelUseDefaultValidationtErrorProcessor: true
|
||||||
camelRestClientRequestValidation: true
|
camelRestClientRequestValidation: true
|
||||||
camelSecurityDefinitions: true
|
camelSecurityDefinitions: true
|
||||||
|
@ -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|
|
|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|
|
|camelRestComponent|name of the Camel component to use as the REST consumer| |servlet|
|
||||||
|camelSecurityDefinitions|generate camel security definitions| |true|
|
|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|
|
|camelValidationErrorProcessor|validation error processor bean name| |validationErrorProcessor|
|
||||||
|configPackage|configuration package for generated code| |org.openapitools.configuration|
|
|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|
|
|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|
|
||||||
|
@ -42,10 +42,10 @@
|
|||||||
<camelDataformatProperties>json.out.disableFeatures=WRITE_DATES_AS_TIMESTAMPS</camelDataformatProperties>
|
<camelDataformatProperties>json.out.disableFeatures=WRITE_DATES_AS_TIMESTAMPS</camelDataformatProperties>
|
||||||
<withXml>true</withXml>
|
<withXml>true</withXml>
|
||||||
<jackson>true</jackson>
|
<jackson>true</jackson>
|
||||||
<camelUseDefaulValidationtErrorProcessor>true</camelUseDefaulValidationtErrorProcessor>
|
<camelUseDefaultValidationtErrorProcessor>true</camelUseDefaultValidationtErrorProcessor>
|
||||||
<!--
|
<!--
|
||||||
Define bean validation error processor
|
Define bean validation error processor
|
||||||
<camelUseDefaulValidationtErrorProcessor>false</camelUseDefaulValidationtErrorProcessor>
|
<camelUseDefaultValidationtErrorProcessor>false</camelUseDefaultValidationtErrorProcessor>
|
||||||
<camelValidationErrorProcessor>errorProcessorBeanName</camelValidationErrorProcessor>
|
<camelValidationErrorProcessor>errorProcessorBeanName</camelValidationErrorProcessor>
|
||||||
-->
|
-->
|
||||||
<camelRestClientRequestValidation>true</camelRestClientRequestValidation>
|
<camelRestClientRequestValidation>true</camelRestClientRequestValidation>
|
||||||
|
@ -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_COMPONENT = "camelRestComponent";
|
||||||
public static final String CAMEL_REST_BINDING_MODE = "camelRestBindingMode";
|
public static final String CAMEL_REST_BINDING_MODE = "camelRestBindingMode";
|
||||||
public static final String CAMEL_REST_CLIENT_REQUEST_VALIDATION = "camelRestClientRequestValidation";
|
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_VALIDATION_ERROR_PROCESSOR = "camelValidationErrorProcessor";
|
||||||
public static final String CAMEL_SECURITY_DEFINITIONS = "camelSecurityDefinitions";
|
public static final String CAMEL_SECURITY_DEFINITIONS = "camelSecurityDefinitions";
|
||||||
public static final String CAMEL_DATAFORMAT_PROPERTIES = "camelDataformatProperties";
|
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 camelRestComponent = "servlet";
|
||||||
private String camelRestBindingMode = "auto";
|
private String camelRestBindingMode = "auto";
|
||||||
private boolean camelRestClientRequestValidation = false;
|
private boolean camelRestClientRequestValidation = false;
|
||||||
private boolean camelUseDefaulValidationtErrorProcessor = true;
|
private boolean camelUseDefaultValidationtErrorProcessor = true;
|
||||||
private String camelValidationErrorProcessor = "validationErrorProcessor";
|
private String camelValidationErrorProcessor = "validationErrorProcessor";
|
||||||
private boolean camelSecurityDefinitions = true;
|
private boolean camelSecurityDefinitions = true;
|
||||||
private String camelDataformatProperties = "";
|
private String camelDataformatProperties = "";
|
||||||
@ -109,7 +109,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat
|
|||||||
"RestConfiguration.java"));
|
"RestConfiguration.java"));
|
||||||
if (performBeanValidation) {
|
if (performBeanValidation) {
|
||||||
apiTemplateFiles.put("validation.mustache", "Validator.java");
|
apiTemplateFiles.put("validation.mustache", "Validator.java");
|
||||||
if (camelUseDefaulValidationtErrorProcessor) {
|
if (camelUseDefaultValidationtErrorProcessor) {
|
||||||
supportingFiles.add(new SupportingFile("errorProcessor.mustache",
|
supportingFiles.add(new SupportingFile("errorProcessor.mustache",
|
||||||
(sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator),
|
(sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator),
|
||||||
"ValidationErrorProcessor.java"));
|
"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_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(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_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(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(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));
|
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);
|
camelRestComponent = manageAdditionalProperty(CAMEL_REST_COMPONENT, camelRestComponent);
|
||||||
camelRestBindingMode = manageAdditionalProperty(CAMEL_REST_BINDING_MODE, camelRestBindingMode);
|
camelRestBindingMode = manageAdditionalProperty(CAMEL_REST_BINDING_MODE, camelRestBindingMode);
|
||||||
camelRestClientRequestValidation = manageAdditionalProperty(CAMEL_REST_CLIENT_REQUEST_VALIDATION, camelRestClientRequestValidation);
|
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);
|
camelValidationErrorProcessor = manageAdditionalProperty(CAMEL_VALIDATION_ERROR_PROCESSOR, camelValidationErrorProcessor);
|
||||||
camelSecurityDefinitions = manageAdditionalProperty(CAMEL_SECURITY_DEFINITIONS, camelSecurityDefinitions);
|
camelSecurityDefinitions = manageAdditionalProperty(CAMEL_SECURITY_DEFINITIONS, camelSecurityDefinitions);
|
||||||
camelDataformatProperties = manageAdditionalProperty(CAMEL_DATAFORMAT_PROPERTIES, camelDataformatProperties);
|
camelDataformatProperties = manageAdditionalProperty(CAMEL_DATAFORMAT_PROPERTIES, camelDataformatProperties);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user