From 91275481179beb4f07b29f4b19c4f78917cc984c Mon Sep 17 00:00:00 2001 From: smjain <49463903+allthingssecurity@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:20:35 +0530 Subject: [PATCH] CAMEL-25752: camel-core - document skipBindingOnErrorCode with its runtime default true The rest DSL documented skipBindingOnErrorCode with the default value false on restConfiguration, rest, the verbs and restBinding, while org.apache.camel.spi.RestConfiguration, which an option that is not set falls back to, defaults to true. The @Metadata of the four model classes now says true; runtime behaviour does not change. Regenerated from the metadata: the camel-core-model JSON, the XML (xml-io and spring) and YAML DSL schemas, the YAML DSL deserializers and the catalog copies. The route writers do not change for this option: since CAMEL-25721 they write the rest binding options whenever they are set, whatever their default. Also, outside the scope of the ticket, the follow-up promised in the review of CAMEL-25721 (#28029): the apiDocs option of a rest verb takes the value of its rest when it is not set (RestOpenApiReader), so a verb with apiDocs="true" under a rest with apiDocs="false" lost its value in a route dump and was left out of the OpenAPI document once the dump was loaded. ModelWriterGeneratorMojo.Property.isInheritedOption now lists VerbDefinition#apiDocs, and the XML, YAML and Java route writers are regenerated (one line each). The 4.24 upgrade guide lists it with the other options of CAMEL-25721. Tests: RestBindingOptionsDefaultValueTest compares the documented default of the rest binding options with RestConfiguration; the XML, YAML and Java dumps keep skipBindingOnErrorCode=false; the XML round trip (restVerbApiDocs.xml in ModelWriterTest), YamlModelWriterTest and LwModelToJavaDumperTest keep apiDocs=true on a verb under a rest with apiDocs=false. Co-Authored-By: Claude Opus 5.5 --- .../apache/camel/catalog/models/delete.json | 2 +- .../org/apache/camel/catalog/models/get.json | 2 +- .../org/apache/camel/catalog/models/head.json | 2 +- .../apache/camel/catalog/models/patch.json | 2 +- .../org/apache/camel/catalog/models/post.json | 2 +- .../org/apache/camel/catalog/models/put.json | 2 +- .../org/apache/camel/catalog/models/rest.json | 2 +- .../camel/catalog/models/restBinding.json | 2 +- .../catalog/models/restConfiguration.json | 2 +- .../camel/catalog/schemas/camel-spring.xsd | 8 +- .../camel/catalog/schemas/camel-xml-io.xsd | 8 +- .../catalog/schemas/camelYamlDsl-model.json | 18 ++--- .../org/apache/camel/model/rest/delete.json | 2 +- .../org/apache/camel/model/rest/get.json | 2 +- .../org/apache/camel/model/rest/head.json | 2 +- .../org/apache/camel/model/rest/patch.json | 2 +- .../org/apache/camel/model/rest/post.json | 2 +- .../org/apache/camel/model/rest/put.json | 2 +- .../org/apache/camel/model/rest/rest.json | 2 +- .../apache/camel/model/rest/restBinding.json | 2 +- .../camel/model/rest/restConfiguration.json | 2 +- .../model/rest/RestBindingDefinition.java | 2 +- .../rest/RestConfigurationDefinition.java | 2 +- .../camel/model/rest/RestDefinition.java | 2 +- .../camel/model/rest/VerbDefinition.java | 2 +- .../RestBindingOptionsDefaultValueTest.java | 74 +++++++++++++++++++ .../camel/java/out/JavaDslModelWriter.java | 2 +- .../camel/java/LwModelToJavaDumperTest.java | 48 ++++++++++++ .../org/apache/camel/xml/out/ModelWriter.java | 2 +- .../apache/camel/xml/in/ModelParserTest.java | 3 +- .../resources/restSkipBindingOnErrorCode.xml | 27 +++++++ .../src/test/resources/restVerbApiDocs.xml | 30 ++++++++ .../camel/yaml/out/YamlModelWriter.java | 2 +- .../camel/yaml/out/YamlModelWriterTest.java | 40 ++++++++++ .../pages/camel-4x-upgrade-guide-4_24.adoc | 17 ++++- .../deserializers/ModelDeserializers.java | 18 ++--- .../schema/camelYamlDsl-canonical.json | 18 ++--- .../resources/schema/camelYamlDsl-model.json | 18 ++--- .../resources/schema/camelYamlDsl.json | 18 ++--- .../packaging/ModelWriterGeneratorMojo.java | 7 +- 40 files changed, 316 insertions(+), 86 deletions(-) create mode 100644 core/camel-core-model/src/test/java/org/apache/camel/model/rest/RestBindingOptionsDefaultValueTest.java create mode 100644 core/camel-xml-io/src/test/resources/restSkipBindingOnErrorCode.xml create mode 100644 core/camel-xml-io/src/test/resources/restVerbApiDocs.xml diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delete.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delete.json index 68fe8a8acde28..73070f19879b4 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delete.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delete.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/get.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/get.json index 7fb0746c34a49..3dcc995ed14e3 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/get.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/get.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/head.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/head.json index 80852f498c75f..6c5bb5f8e7566 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/head.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/head.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/patch.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/patch.json index 9b75ddd456506..2ea5765a4f152 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/patch.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/patch.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/post.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/post.json index 7867b39e0678a..327f1bb7d999b 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/post.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/post.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/put.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/put.json index 648db6ecd7144..f3acec8bccc15 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/put.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/put.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/rest.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/rest.json index 48637f389712c..f819bc218e43c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/rest.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/rest.json @@ -20,7 +20,7 @@ "consumes": { "index": 5, "kind": "attribute", "displayName": "Consumes", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type the REST service consumes (accept as input), such as application\/xml or application\/json. This option will override what may be configured on a parent level." }, "produces": { "index": 6, "kind": "attribute", "displayName": "Produces", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type the REST service produces (uses for output), such as application\/xml or application\/json. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 7, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 8, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 8, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 9, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 10, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 11, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/restBinding.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/restBinding.json index 0b84a9b4a9af3..05f37f45dd7d5 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/restBinding.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/restBinding.json @@ -20,7 +20,7 @@ "bindingMode": { "index": 5, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML." }, "type": { "index": 6, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data." }, "outType": { "index": 7, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data." }, - "skipBindingOnErrorCode": { "index": 8, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do." }, + "skipBindingOnErrorCode": { "index": 8, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do." }, "clientRequestValidation": { "index": 9, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 10, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 11, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/restConfiguration.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/restConfiguration.json index 84084eb8babca..3603fb9f5ff47 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/restConfiguration.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/restConfiguration.json @@ -28,7 +28,7 @@ "hostNameResolver": { "index": 13, "kind": "attribute", "displayName": "Host Name Resolver", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.model.rest.RestHostNameResolver", "enum": [ "allLocalIp", "localHostName", "localIp", "none" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "allLocalIp", "description": "If no hostname has been explicit configured, then this resolver is used to compute the hostname the REST service will be using." }, "bindingMode": { "index": 14, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "org.apache.camel.model.rest.RestBindingMode", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML." }, "bindingPackageScan": { "index": 15, "kind": "attribute", "displayName": "Binding Package Scan", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Package name to use as base (offset) for classpath scanning of POJO classes are located when using binding mode is enabled for JSon or XML. Multiple package names can be separated by comma." }, - "skipBindingOnErrorCode": { "index": 16, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do." }, + "skipBindingOnErrorCode": { "index": 16, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do." }, "clientRequestValidation": { "index": 17, "kind": "attribute", "displayName": "Client Request Validation", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 18, "kind": "attribute", "displayName": "Client Response Validation", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 19, "kind": "attribute", "displayName": "Enable CORS", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd index 278dd6cd0df9f..e882cabaa7800 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd @@ -15343,7 +15343,7 @@ enabled for JSon or XML. Multiple package names can be separated by comma. @@ -15520,7 +15520,7 @@ a parent level. Default value: off @@ -15944,7 +15944,7 @@ a parent level. Default value: off @@ -16982,7 +16982,7 @@ Sets the class name to use for binding from POJO to output for the outgoing data diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd index e59829db331e4..acdfab485ed68 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd @@ -14486,7 +14486,7 @@ enabled for JSon or XML. Multiple package names can be separated by comma. @@ -14663,7 +14663,7 @@ a parent level. Default value: off @@ -15087,7 +15087,7 @@ a parent level. Default value: off @@ -16125,7 +16125,7 @@ Sets the class name to use for binding from POJO to output for the outgoing data diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json index bab314bd2401f..b4e461e749d14 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json @@ -17006,7 +17006,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -17248,7 +17248,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -17490,7 +17490,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -18055,7 +18055,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -18297,7 +18297,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -18539,7 +18539,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -18866,7 +18866,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 8, @@ -19102,7 +19102,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 16, @@ -19353,7 +19353,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 8, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/delete.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/delete.json index 68fe8a8acde28..73070f19879b4 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/delete.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/delete.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/get.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/get.json index 7fb0746c34a49..3dcc995ed14e3 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/get.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/get.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/head.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/head.json index 80852f498c75f..6c5bb5f8e7566 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/head.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/head.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/patch.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/patch.json index 9b75ddd456506..2ea5765a4f152 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/patch.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/patch.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/post.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/post.json index 7867b39e0678a..327f1bb7d999b 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/post.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/post.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/put.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/put.json index 648db6ecd7144..f3acec8bccc15 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/put.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/put.json @@ -26,7 +26,7 @@ "type": { "index": 11, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level." }, "outType": { "index": 12, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 13, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 14, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 15, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 16, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 17, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/rest.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/rest.json index 48637f389712c..f819bc218e43c 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/rest.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/rest.json @@ -20,7 +20,7 @@ "consumes": { "index": 5, "kind": "attribute", "displayName": "Consumes", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type the REST service consumes (accept as input), such as application\/xml or application\/json. This option will override what may be configured on a parent level." }, "produces": { "index": 6, "kind": "attribute", "displayName": "Produces", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type the REST service produces (uses for output), such as application\/xml or application\/json. This option will override what may be configured on a parent level." }, "bindingMode": { "index": 7, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML. This option will override what may be configured on a parent level." }, - "skipBindingOnErrorCode": { "index": 8, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, + "skipBindingOnErrorCode": { "index": 8, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level." }, "clientRequestValidation": { "index": 9, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 10, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 11, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/restBinding.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/restBinding.json index 0b84a9b4a9af3..05f37f45dd7d5 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/restBinding.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/restBinding.json @@ -20,7 +20,7 @@ "bindingMode": { "index": 5, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML." }, "type": { "index": 6, "kind": "attribute", "displayName": "Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data." }, "outType": { "index": 7, "kind": "attribute", "displayName": "Out Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data." }, - "skipBindingOnErrorCode": { "index": 8, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do." }, + "skipBindingOnErrorCode": { "index": 8, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do." }, "clientRequestValidation": { "index": 9, "kind": "attribute", "displayName": "Client Request Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 10, "kind": "attribute", "displayName": "Client Response Validation", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 11, "kind": "attribute", "displayName": "Enable CORS", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/restConfiguration.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/restConfiguration.json index 84084eb8babca..3603fb9f5ff47 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/restConfiguration.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/restConfiguration.json @@ -28,7 +28,7 @@ "hostNameResolver": { "index": 13, "kind": "attribute", "displayName": "Host Name Resolver", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.model.rest.RestHostNameResolver", "enum": [ "allLocalIp", "localHostName", "localIp", "none" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "allLocalIp", "description": "If no hostname has been explicit configured, then this resolver is used to compute the hostname the REST service will be using." }, "bindingMode": { "index": 14, "kind": "attribute", "displayName": "Binding Mode", "group": "common", "required": false, "type": "enum", "javaType": "org.apache.camel.model.rest.RestBindingMode", "enum": [ "off", "auto", "json", "xml", "json_xml" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "off", "description": "Sets the binding mode for automatic marshalling and unmarshalling of request and response bodies. off (default) disables binding. auto detects JSON or XML from the Content-Type header. json binds using a JSON data format only. xml binds using an XML data format only. json_xml supports both JSON and XML." }, "bindingPackageScan": { "index": 15, "kind": "attribute", "displayName": "Binding Package Scan", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Package name to use as base (offset) for classpath scanning of POJO classes are located when using binding mode is enabled for JSon or XML. Multiple package names can be separated by comma." }, - "skipBindingOnErrorCode": { "index": 16, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do." }, + "skipBindingOnErrorCode": { "index": 16, "kind": "attribute", "displayName": "Skip Binding On Error Code", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json \/ xml etc, as success messages otherwise will do." }, "clientRequestValidation": { "index": 17, "kind": "attribute", "displayName": "Client Request Validation", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable validation of the client request to check whether Content-Type\/Accept headers, required parameters, and message body are valid." }, "clientResponseValidation": { "index": 18, "kind": "attribute", "displayName": "Client Response Validation", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to validate what Camel is returning as response to the client, such as checking status-code, Content-Type, and headers match the Rest DSL response definition." }, "enableCORS": { "index": 19, "kind": "attribute", "displayName": "Enable CORS", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to enable CORS headers in the HTTP response." }, diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java index b50b51f472d91..4e2593b59390f 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java @@ -80,7 +80,7 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition outTypeClass; @XmlAttribute @Metadata(description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", - label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") private String skipBindingOnErrorCode; @XmlAttribute @Metadata(description = "Whether to enable validation of the client request to check whether Content-Type/Accept headers, required parameters, and message body are valid.", diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java index 1eaf17a8ccbcb..1a4a7a1f4dfa1 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java @@ -104,7 +104,7 @@ public class RestConfigurationDefinition { private String bindingPackageScan; @XmlAttribute @Metadata(description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", - label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") private String skipBindingOnErrorCode; @XmlAttribute @Metadata(description = "Whether to enable validation of the client request to check whether Content-Type/Accept headers, required parameters, and message body are valid.", diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java index e3afb213e7136..e4f69097e4d41 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java @@ -91,7 +91,7 @@ public class RestDefinition extends OptionalIdentifiedDefinition private String bindingMode; @XmlAttribute @Metadata(description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") private String skipBindingOnErrorCode; @XmlAttribute @Metadata(description = "Whether to enable validation of the client request to check whether Content-Type/Accept headers, required parameters, and message body are valid.", diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java index 6c592f2afda3c..3e3f7386bb387 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java @@ -83,7 +83,7 @@ public abstract class VerbDefinition extends OptionalIdentifiedDefinition> MODEL_CLASSES = List.of( + RestConfigurationDefinition.class, RestDefinition.class, VerbDefinition.class, RestBindingDefinition.class); + + private static final List OPTIONS = List.of( + "bindingMode", "skipBindingOnErrorCode", "clientRequestValidation", "clientResponseValidation", "enableCORS", + "enableNoContentResponse"); + + @Test + public void documentedDefaultIsTheRuntimeDefault() throws Exception { + RestConfiguration runtime = new RestConfiguration(); + List mismatches = new ArrayList<>(); + for (String option : OPTIONS) { + String expected = runtimeDefault(runtime, option); + for (Class model : MODEL_CLASSES) { + Field field = model.getDeclaredField(option); + Metadata metadata = field.getAnnotation(Metadata.class); + String actual = metadata != null ? metadata.defaultValue() : ""; + if (!expected.equals(actual)) { + mismatches.add(model.getSimpleName() + "." + option + " documents the default '" + actual + + "' but RestConfiguration defaults to '" + expected + "'"); + } + } + } + assertTrue(mismatches.isEmpty(), String.join("\n", mismatches)); + } + + private static String runtimeDefault(RestConfiguration runtime, String option) throws Exception { + String suffix = StringHelper.capitalize(option); + Method getter; + try { + getter = RestConfiguration.class.getMethod("is" + suffix); + } catch (NoSuchMethodException e) { + getter = RestConfiguration.class.getMethod("get" + suffix); + } + return String.valueOf(getter.invoke(runtime)); + } +} diff --git a/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java b/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java index 8ad31bfe061b6..30b5500644e56 100644 --- a/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java +++ b/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java @@ -3931,7 +3931,7 @@ protected void doWriteVerbDefinitionAttributes(StringBuilder sb, VerbDefinition doWriteAttribute(sb, "path", def.getPath(), null); doWriteAttribute(sb, "routeId", def.getRouteId(), null); doWriteAttribute(sb, "bindingMode", def.getBindingMode(), null); - doWriteAttribute(sb, "apiDocs", def.getApiDocs(), "true"); + doWriteAttribute(sb, "apiDocs", def.getApiDocs(), null); doWriteAttribute(sb, "enableNoContentResponse", def.getEnableNoContentResponse(), null); doWriteAttribute(sb, "skipBindingOnErrorCode", def.getSkipBindingOnErrorCode(), null); doWriteAttribute(sb, "clientRequestValidation", def.getClientRequestValidation(), null); diff --git a/core/camel-java-io/src/test/java/org/apache/camel/java/LwModelToJavaDumperTest.java b/core/camel-java-io/src/test/java/org/apache/camel/java/LwModelToJavaDumperTest.java index ae4d9a667fa2a..30a766f6d6746 100644 --- a/core/camel-java-io/src/test/java/org/apache/camel/java/LwModelToJavaDumperTest.java +++ b/core/camel-java-io/src/test/java/org/apache/camel/java/LwModelToJavaDumperTest.java @@ -21,12 +21,15 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.builder.RouteConfigurationBuilder; import org.apache.camel.impl.DefaultCamelContext; +import org.apache.camel.java.out.JavaDslModelWriter; import org.apache.camel.model.Model; import org.apache.camel.model.RouteConfigurationDefinition; import org.apache.camel.model.RouteTemplateDefinition; import org.apache.camel.model.ThrowExceptionDefinition; import org.apache.camel.model.rest.RestBindingMode; +import org.apache.camel.model.rest.RestConfigurationDefinition; import org.apache.camel.model.rest.RestDefinition; +import org.apache.camel.xml.LwModelToXMLDumper; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -64,6 +67,51 @@ public void configuration() { } } + @Test + public void testDumpRestKeepsSkipBindingOnErrorCodeFalse() throws Exception { + // skipBindingOnErrorCode defaults to true, so false set explicitly must be kept + try (DefaultCamelContext context = new DefaultCamelContext()) { + context.addRoutes(new RouteBuilder() { + @Override + public void configure() { + rest("/api").skipBindingOnErrorCode(false) + .get("/hello").skipBindingOnErrorCode(false).to("direct:hello"); + } + }); + Model model = context.getCamelContextExtension().getContextPlugin(Model.class); + RestDefinition rest = model.getRestDefinitions().get(0); + + String java = new LwModelToJavaDumper().dumpModelAsJava(context, rest); + assertThat(java.split("\\.skipBindingOnErrorCode\\(false\\)", -1)).as(java).hasSize(3); + + String xml = new LwModelToXMLDumper().dumpModelAsXml(context, rest); + assertThat(xml.split("skipBindingOnErrorCode=\"false\"", -1)).as(xml).hasSize(3); + + RestConfigurationDefinition config = new RestConfigurationDefinition().skipBindingOnErrorCode(false); + assertThat(new JavaDslModelWriter().writeRestConfiguration(config)).contains(".skipBindingOnErrorCode(false)"); + } + } + + @Test + public void testDumpRestVerbApiDocsTrueUnderRestApiDocsFalse() throws Exception { + // a verb whose apiDocs is not set takes the value of its rest, so apiDocs(true) set on the verb must be kept + try (DefaultCamelContext context = new DefaultCamelContext()) { + context.addRoutes(new RouteBuilder() { + @Override + public void configure() { + rest("/api").apiDocs(false) + .get("/documented").apiDocs(true).to("direct:documented"); + } + }); + Model model = context.getCamelContextExtension().getContextPlugin(Model.class); + RestDefinition rest = model.getRestDefinitions().get(0); + + String java = new LwModelToJavaDumper().dumpModelAsJava(context, rest); + // once for the rest and once for the verb + assertThat(java.split("\\.apiDocs\\(", -1)).as(java).hasSize(3); + } + } + @Test public void testDumpMultiLineExpression() throws Exception { try (DefaultCamelContext context = new DefaultCamelContext()) { diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java index d53218b156d70..c18aec4ad8d63 100644 --- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java +++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java @@ -3476,7 +3476,7 @@ protected void doWriteVerbDefinitionAttributes(VerbDefinition def) throws IOExce doWriteAttribute("path", def.getPath(), null); doWriteAttribute("routeId", def.getRouteId(), null); doWriteAttribute("bindingMode", def.getBindingMode(), null); - doWriteAttribute("apiDocs", def.getApiDocs(), "true"); + doWriteAttribute("apiDocs", def.getApiDocs(), null); doWriteAttribute("enableNoContentResponse", def.getEnableNoContentResponse(), null); doWriteAttribute("skipBindingOnErrorCode", def.getSkipBindingOnErrorCode(), null); doWriteAttribute("clientRequestValidation", def.getClientRequestValidation(), null); diff --git a/core/camel-xml-io/src/test/java/org/apache/camel/xml/in/ModelParserTest.java b/core/camel-xml-io/src/test/java/org/apache/camel/xml/in/ModelParserTest.java index 7f6ac36a195c8..aade3352b428c 100644 --- a/core/camel-xml-io/src/test/java/org/apache/camel/xml/in/ModelParserTest.java +++ b/core/camel-xml-io/src/test/java/org/apache/camel/xml/in/ModelParserTest.java @@ -71,7 +71,8 @@ public class ModelParserTest { public static final String NAMESPACE = "http://camel.apache.org/schema/xml-io"; private static final List REST_XMLS - = List.of("barRest.xml", "simpleRest.xml", "simpleRestToD.xml", "restAllowedValues.xml"); + = List.of("barRest.xml", "simpleRest.xml", "simpleRestToD.xml", "restAllowedValues.xml", + "restSkipBindingOnErrorCode.xml", "restVerbApiDocs.xml"); private static final List TEMPLATE_XMLS = List.of("barTemplate.xml"); private static final List TEMPLATED_ROUTE_XMLS = List.of("barTemplatedRoute.xml"); private static final List REST_CONFIGURATION_XMLS = List.of("barRestConfiguration.xml"); diff --git a/core/camel-xml-io/src/test/resources/restSkipBindingOnErrorCode.xml b/core/camel-xml-io/src/test/resources/restSkipBindingOnErrorCode.xml new file mode 100644 index 0000000000000..39b0469c1d4c3 --- /dev/null +++ b/core/camel-xml-io/src/test/resources/restSkipBindingOnErrorCode.xml @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/core/camel-xml-io/src/test/resources/restVerbApiDocs.xml b/core/camel-xml-io/src/test/resources/restVerbApiDocs.xml new file mode 100644 index 0000000000000..d9327fbd2538e --- /dev/null +++ b/core/camel-xml-io/src/test/resources/restVerbApiDocs.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + diff --git a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java index 0f0e930a66c5d..614e3877de5e7 100644 --- a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java +++ b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java @@ -3479,7 +3479,7 @@ protected void doWriteVerbDefinitionAttributes(JsonObject jo, VerbDefinition def doWriteAttribute(jo, "path", def.getPath(), null); doWriteAttribute(jo, "routeId", def.getRouteId(), null); doWriteAttribute(jo, "bindingMode", def.getBindingMode(), null); - doWriteAttribute(jo, "apiDocs", def.getApiDocs(), "true"); + doWriteAttribute(jo, "apiDocs", def.getApiDocs(), null); doWriteAttribute(jo, "enableNoContentResponse", def.getEnableNoContentResponse(), null); doWriteAttribute(jo, "skipBindingOnErrorCode", def.getSkipBindingOnErrorCode(), null); doWriteAttribute(jo, "clientRequestValidation", def.getClientRequestValidation(), null); diff --git a/core/camel-yaml-io/src/test/java/org/apache/camel/yaml/out/YamlModelWriterTest.java b/core/camel-yaml-io/src/test/java/org/apache/camel/yaml/out/YamlModelWriterTest.java index cf310417dc828..baf908500b36d 100644 --- a/core/camel-yaml-io/src/test/java/org/apache/camel/yaml/out/YamlModelWriterTest.java +++ b/core/camel-yaml-io/src/test/java/org/apache/camel/yaml/out/YamlModelWriterTest.java @@ -1111,6 +1111,46 @@ public void testRestConfiguration() throws Exception { Assertions.assertEquals(expected, out); } + @Test + public void testRestSkipBindingOnErrorCodeFalse() throws Exception { + // skipBindingOnErrorCode defaults to true, so false set explicitly must be kept + YamlModelWriter writer = new YamlModelWriter(); + + RestConfigurationDefinition rc = new RestConfigurationDefinition(); + rc.setSkipBindingOnErrorCode("false"); + String out = writer.printAsYaml(List.of(writer.writeRestConfigurationDefinition(rc))); + Assertions.assertTrue(out.contains("skipBindingOnErrorCode: false"), out); + + RestDefinition rest = new RestDefinition(); + rest.setPath("/api"); + rest.setSkipBindingOnErrorCode("false"); + GetDefinition get = new GetDefinition(); + get.setPath("/hello"); + get.setSkipBindingOnErrorCode("false"); + get.setTo(new ToDefinition("direct:hello")); + rest.getVerbs().add(get); + out = writer.printAsYaml(List.of(writer.writeRestDefinition(rest))); + Assertions.assertEquals(2, out.split("skipBindingOnErrorCode: false", -1).length - 1, out); + } + + @Test + public void testRestVerbApiDocsTrueUnderRestApiDocsFalse() throws Exception { + // a verb whose apiDocs is not set takes the value of its rest, so apiDocs=true set on the verb must be kept + YamlModelWriter writer = new YamlModelWriter(); + + RestDefinition rest = new RestDefinition(); + rest.setPath("/api"); + rest.setApiDocs("false"); + GetDefinition get = new GetDefinition(); + get.setPath("/documented"); + get.setApiDocs("true"); + get.setTo(new ToDefinition("direct:documented")); + rest.getVerbs().add(get); + String out = writer.printAsYaml(List.of(writer.writeRestDefinition(rest))); + Assertions.assertTrue(out.contains("apiDocs: false"), out); + Assertions.assertTrue(out.contains("apiDocs: true"), out); + } + @Test public void testTransformers() throws Exception { YamlModelWriter writer = new YamlModelWriter(); diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc index 5b1e7e99e39d9..1dff82d8e4413 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc @@ -25,6 +25,14 @@ in its model, so clearing them on the route saved little memory at the cost of m Applications that called `Route.clearRouteModel()` directly can remove the call. Implementations of the `Route` interface that override `clearRouteModel()` can remove the override. +=== camel-core - the documented default of skipBindingOnErrorCode is true + +The `skipBindingOnErrorCode` option of the Rest DSL (on `restConfiguration`, `rest`, its verbs and `restBinding`) is now +documented with the default value `true`, the default it has always had at runtime. Before, the model, the catalog, the +XML and YAML DSL schemas said `false`. Routes behave as before. + +Tools that read the default from the catalog or the schemas now see `true`. + === camel-report-maven-plugin:validate / configuration-validate The catalog now accepts all `camel.*` groups defined in `camel-main-configuration-metadata.json` @@ -578,10 +586,11 @@ provider is detected as before. The XML, YAML and Java route dumps (`camel transform route`, `camel validate normalize`, `camel.main.dumpRoutes`, the developer console) now write these options whenever they are set, also with their documented default value: the binding options of the rest configuration, a rest and its verbs (such as `bindingMode="off"`), the options of a -redelivery policy, of a `resilience4jConfiguration` and of a `faultToleranceConfiguration`, and `shutdownRoute` / -`shutdownRunningTask` of a route. Left out, such an option took the value of the parent level when the dump was loaded -(the rest configuration, the error handler, the global circuit breaker configuration, the CamelContext), so the route -behaved differently. +redelivery policy, of a `resilience4jConfiguration` and of a `faultToleranceConfiguration`, `shutdownRoute` / +`shutdownRunningTask` of a route, and `apiDocs` of a rest verb. Left out, such an option took the value of the parent +level when the dump was loaded (the rest configuration or the rest, the error handler, the global circuit breaker +configuration, the CamelContext), so the route behaved differently, or, for `apiDocs`, a verb with `apiDocs="true"` +under a rest with `apiDocs="false"` was left out of the OpenAPI document. === camel-jbang - camel get bean, get route-controller and top source diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java index 69b706129f04f..162ff134f2397 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java @@ -4582,7 +4582,7 @@ protected boolean setProperty(DelayDefinition target, String propertyKey, @YamlProperty(name = "responseMessage", type = "array:org.apache.camel.model.rest.ResponseMessageDefinition", description = "Response details for this REST operation", displayName = "Response Message"), @YamlProperty(name = "routeId", type = "string", description = "The route id this REST service will refer to.", displayName = "Route Id"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition", description = "Security settings for this REST operation", displayName = "Security"), - @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "false", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), + @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "true", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), @YamlProperty(name = "streamCache", type = "boolean", defaultValue = "false", description = "Whether stream caching is enabled on this rest operation.", displayName = "Stream Cache"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition", required = true, description = "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call.", displayName = "To"), @YamlProperty(name = "type", type = "string", description = "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level.", displayName = "Type") @@ -6098,7 +6098,7 @@ protected boolean setProperty(ForyDataFormat target, String propertyKey, @YamlProperty(name = "responseMessage", type = "array:org.apache.camel.model.rest.ResponseMessageDefinition", description = "Response details for this REST operation", displayName = "Response Message"), @YamlProperty(name = "routeId", type = "string", description = "The route id this REST service will refer to.", displayName = "Route Id"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition", description = "Security settings for this REST operation", displayName = "Security"), - @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "false", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), + @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "true", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), @YamlProperty(name = "streamCache", type = "boolean", defaultValue = "false", description = "Whether stream caching is enabled on this rest operation.", displayName = "Stream Cache"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition", required = true, description = "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call.", displayName = "To"), @YamlProperty(name = "type", type = "string", description = "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level.", displayName = "Type") @@ -6677,7 +6677,7 @@ protected boolean setProperty(HL7DataFormat target, String propertyKey, String p @YamlProperty(name = "responseMessage", type = "array:org.apache.camel.model.rest.ResponseMessageDefinition", description = "Response details for this REST operation", displayName = "Response Message"), @YamlProperty(name = "routeId", type = "string", description = "The route id this REST service will refer to.", displayName = "Route Id"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition", description = "Security settings for this REST operation", displayName = "Security"), - @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "false", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), + @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "true", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), @YamlProperty(name = "streamCache", type = "boolean", defaultValue = "false", description = "Whether stream caching is enabled on this rest operation.", displayName = "Stream Cache"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition", required = true, description = "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call.", displayName = "To"), @YamlProperty(name = "type", type = "string", description = "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level.", displayName = "Type") @@ -11757,7 +11757,7 @@ protected boolean setProperty(ParquetAvroDataFormat target, String propertyKey, @YamlProperty(name = "responseMessage", type = "array:org.apache.camel.model.rest.ResponseMessageDefinition", description = "Response details for this REST operation", displayName = "Response Message"), @YamlProperty(name = "routeId", type = "string", description = "The route id this REST service will refer to.", displayName = "Route Id"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition", description = "Security settings for this REST operation", displayName = "Security"), - @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "false", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), + @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "true", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), @YamlProperty(name = "streamCache", type = "boolean", defaultValue = "false", description = "Whether stream caching is enabled on this rest operation.", displayName = "Stream Cache"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition", required = true, description = "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call.", displayName = "To"), @YamlProperty(name = "type", type = "string", description = "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level.", displayName = "Type") @@ -12355,7 +12355,7 @@ protected boolean setProperty(PollEnrichDefinition target, String propertyKey, @YamlProperty(name = "responseMessage", type = "array:org.apache.camel.model.rest.ResponseMessageDefinition", description = "Response details for this REST operation", displayName = "Response Message"), @YamlProperty(name = "routeId", type = "string", description = "The route id this REST service will refer to.", displayName = "Route Id"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition", description = "Security settings for this REST operation", displayName = "Security"), - @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "false", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), + @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "true", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), @YamlProperty(name = "streamCache", type = "boolean", defaultValue = "false", description = "Whether stream caching is enabled on this rest operation.", displayName = "Stream Cache"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition", required = true, description = "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call.", displayName = "To"), @YamlProperty(name = "type", type = "string", description = "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level.", displayName = "Type") @@ -12905,7 +12905,7 @@ protected boolean setProperty(ProtobufDataFormat target, String propertyKey, @YamlProperty(name = "responseMessage", type = "array:org.apache.camel.model.rest.ResponseMessageDefinition", description = "Response details for this REST operation", displayName = "Response Message"), @YamlProperty(name = "routeId", type = "string", description = "The route id this REST service will refer to.", displayName = "Route Id"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition", description = "Security settings for this REST operation", displayName = "Security"), - @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "false", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), + @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "true", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), @YamlProperty(name = "streamCache", type = "boolean", defaultValue = "false", description = "Whether stream caching is enabled on this rest operation.", displayName = "Stream Cache"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition", required = true, description = "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call.", displayName = "To"), @YamlProperty(name = "type", type = "string", description = "Sets the class name to use for binding from input to POJO for the incoming data. This option will override what may be configured on a parent level.", displayName = "Type") @@ -14629,7 +14629,7 @@ protected boolean setProperty(ResponseMessageDefinition target, String propertyK @YamlProperty(name = "note", type = "string", description = "The note for this node", displayName = "Note"), @YamlProperty(name = "outType", type = "string", description = "Sets the class name to use for binding from POJO to output for the outgoing data.", displayName = "Out Type"), @YamlProperty(name = "produces", type = "string", description = "The content type the REST service produces (uses for output), such as application/xml or application/json.", displayName = "Produces"), - @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "false", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", displayName = "Skip Binding On Error Code"), + @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "true", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", displayName = "Skip Binding On Error Code"), @YamlProperty(name = "type", type = "string", description = "Sets the class name to use for binding from input to POJO for the incoming data.", displayName = "Type") } ) @@ -14762,7 +14762,7 @@ protected boolean setProperty(RestBindingDefinition target, String propertyKey, @YamlProperty(name = "producerApiDoc", type = "string", description = "Sets the location of the api document the REST producer will use to validate the REST uri and query parameters are valid accordingly to the api document.", displayName = "Producer Api Doc"), @YamlProperty(name = "producerComponent", type = "enum:vertx-http,http,undertow,netty-http", description = "Sets the name of the Camel component to use as the REST producer.", displayName = "Producer Component"), @YamlProperty(name = "scheme", type = "string", description = "The scheme to use for exposing the REST service. Usually http or https is supported.", displayName = "Scheme"), - @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "false", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", displayName = "Skip Binding On Error Code"), + @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "true", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", displayName = "Skip Binding On Error Code"), @YamlProperty(name = "useXForwardHeaders", type = "boolean", defaultValue = "false", description = "Whether to use X-Forward headers to set host etc. for OpenApi. This may be needed in special cases involving reverse-proxy and networking going from HTTP to HTTPS etc.", displayName = "Use XForward Headers"), @YamlProperty(name = "validationLevels", type = "array:org.apache.camel.model.rest.RestPropertyDefinition", description = "Allows to configure custom validation levels when using camel-openapi-validator with client request/response validator.", displayName = "Validation Levels"), @YamlProperty(name = "xmlDataFormat", type = "enum:jaxb,jacksonXml", defaultValue = "jaxb", description = "Name of specific XML data format to use. By default jaxb will be used. Important: This option is only for setting a custom name of the data format, not to refer to an existing data format instance.", displayName = "Xml Data Format") @@ -15018,7 +15018,7 @@ protected boolean setProperty(RestContextRefDefinition target, String propertyKe @YamlProperty(name = "put", type = "array:org.apache.camel.model.rest.PutDefinition"), @YamlProperty(name = "securityDefinitions", type = "object:org.apache.camel.model.rest.RestSecuritiesDefinition", description = "Sets the security definitions such as Basic, OAuth2 etc.", displayName = "Security Definitions"), @YamlProperty(name = "securityRequirements", type = "array:org.apache.camel.model.rest.SecurityDefinition", description = "Sets the security requirement(s) for all endpoints.", displayName = "Security Requirements"), - @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "false", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), + @YamlProperty(name = "skipBindingOnErrorCode", type = "boolean", defaultValue = "true", description = "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", displayName = "Skip Binding On Error Code"), @YamlProperty(name = "tag", type = "string", description = "To configure a special tag for the operations within this rest definition.", displayName = "Tag") } ) diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json index eb17962820342..dcfc26e8c91fa 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json @@ -11343,7 +11343,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -11487,7 +11487,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -11631,7 +11631,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -12008,7 +12008,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -12152,7 +12152,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -12296,7 +12296,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -12495,7 +12495,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", - "default" : false + "default" : true }, "type" : { "type" : "string", @@ -12682,7 +12682,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", - "default" : false + "default" : true }, "useXForwardHeaders" : { "type" : "boolean", @@ -12844,7 +12844,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "tag" : { "type" : "string", diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json index bab314bd2401f..b4e461e749d14 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json @@ -17006,7 +17006,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -17248,7 +17248,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -17490,7 +17490,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -18055,7 +18055,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -18297,7 +18297,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -18539,7 +18539,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 14, @@ -18866,7 +18866,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 8, @@ -19102,7 +19102,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 16, @@ -19353,7 +19353,7 @@ "type" : "boolean", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", "title" : "Skip Binding On Error Code", - "default" : "false", + "default" : "true", "displayName" : "Skip Binding On Error Code", "kind" : "attribute", "index" : 8, diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json index 60f34e13454c5..d580432221c3e 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json @@ -13783,7 +13783,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -13927,7 +13927,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -14071,7 +14071,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -14448,7 +14448,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -14592,7 +14592,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -14736,7 +14736,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "streamCache" : { "type" : "boolean", @@ -14935,7 +14935,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", - "default" : false + "default" : true }, "type" : { "type" : "string", @@ -15122,7 +15122,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do.", - "default" : false + "default" : true }, "useXForwardHeaders" : { "type" : "boolean", @@ -15284,7 +15284,7 @@ "type" : "boolean", "title" : "Skip Binding On Error Code", "description" : "Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level.", - "default" : false + "default" : true }, "tag" : { "type" : "string", diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ModelWriterGeneratorMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ModelWriterGeneratorMojo.java index c772156f02899..0fc69687d84ec 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ModelWriterGeneratorMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ModelWriterGeneratorMojo.java @@ -509,15 +509,16 @@ public static class Property { /** * The options (declaring class and attribute name) that are written whenever they are set, for the same reason: * the rest binding options of a verb take the value of its rest, then of the rest configuration, which in turn - * falls back to the RestConfiguration of the CamelContext; the shutdown options of a route take the value of - * the CamelContext. + * falls back to the RestConfiguration of the CamelContext; the apiDocs option of a verb takes the value of its + * rest in the OpenAPI document; the shutdown options of a route take the value of the CamelContext. */ private static final Set INHERITED_OPTIONS = Stream.concat( Stream.of("RestDefinition", "VerbDefinition", "RestBindingDefinition", "RestConfigurationDefinition") .flatMap(c -> Stream.of("bindingMode", "skipBindingOnErrorCode", "clientRequestValidation", "clientResponseValidation", "enableCORS", "enableNoContentResponse") .map(o -> "org.apache.camel.model.rest." + c + "#" + o)), - Stream.of("org.apache.camel.model.RouteDefinition#shutdownRoute", + Stream.of("org.apache.camel.model.rest.VerbDefinition#apiDocs", + "org.apache.camel.model.RouteDefinition#shutdownRoute", "org.apache.camel.model.RouteDefinition#shutdownRunningTask")) .collect(Collectors.toUnmodifiableSet());