diff --git a/bin/configs/java-camel-petstore-new.yaml b/bin/configs/java-camel-petstore-new.yaml index 51f66553da7..9b28eaf1ee7 100644 --- a/bin/configs/java-camel-petstore-new.yaml +++ b/bin/configs/java-camel-petstore-new.yaml @@ -12,6 +12,6 @@ additionalProperties: library: "spring-boot" withXml: true jackson: true - camelUseDefaulValidationtErrorProcessor: true + camelUseDefaultValidationtErrorProcessor: true camelRestClientRequestValidation: true camelSecurityDefinitions: true diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 57f0a58f855..9a6499fe85b 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -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|
**joda**
Joda (for legacy app only)
**legacy**
Legacy java.util.Date
**java8-localdatetime**
Java 8 using LocalDateTime (for legacy app only)
**java8**
Java 8 native JSR310 (preferred for jdk 1.8+)
|java8| diff --git a/modules/openapi-generator-maven-plugin/examples/camel.xml b/modules/openapi-generator-maven-plugin/examples/camel.xml index afcc2632bc3..474383cf922 100644 --- a/modules/openapi-generator-maven-plugin/examples/camel.xml +++ b/modules/openapi-generator-maven-plugin/examples/camel.xml @@ -42,10 +42,10 @@ json.out.disableFeatures=WRITE_DATES_AS_TIMESTAMPS true true - true + true true diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java index 305a9038ffe..12c3c633fe1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java @@ -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);