This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new a2fe7ab6812 CAMEL-22546: Rest DSL model should have enum for
dataformat choices
a2fe7ab6812 is described below
commit a2fe7ab681282f429e992cf2939403a98a8cc4e6
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Oct 14 20:44:46 2025 +0200
CAMEL-22546: Rest DSL model should have enum for dataformat choices
---
.../camel-core-starter/src/main/docs/core.json | 10 ++++++----
.../springboot/RestConfigurationDefinitionProperties.java | 13 +++++++------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/components-starter/camel-core-starter/src/main/docs/core.json
b/components-starter/camel-core-starter/src/main/docs/core.json
index b407a478dab..e105f3fe058 100644
--- a/components-starter/camel-core-starter/src/main/docs/core.json
+++ b/components-starter/camel-core-starter/src/main/docs/core.json
@@ -851,8 +851,9 @@
{
"name": "camel.rest.json-data-format",
"type": "java.lang.String",
- "description": "Name of specific json data format to use. By default
jackson 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.",
- "sourceType":
"org.apache.camel.model.rest.springboot.RestConfigurationDefinitionProperties"
+ "description": "Name of specific json data format to use. By default,
jackson 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.",
+ "sourceType":
"org.apache.camel.model.rest.springboot.RestConfigurationDefinitionProperties",
+ "defaultValue": "jackson"
},
{
"name": "camel.rest.port",
@@ -901,8 +902,9 @@
{
"name": "camel.rest.xml-data-format",
"type": "java.lang.String",
- "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.",
- "sourceType":
"org.apache.camel.model.rest.springboot.RestConfigurationDefinitionProperties"
+ "description": "Name of specific XML data format to use. By default jaxb
will be used, but jacksonXml is also supported. Important: This option is only
for setting a custom name of the data format, not to refer to an existing data
format instance.",
+ "sourceType":
"org.apache.camel.model.rest.springboot.RestConfigurationDefinitionProperties",
+ "defaultValue": "jaxb"
}
],
"hints": [],
diff --git
a/components-starter/camel-core-starter/src/main/java/org/apache/camel/model/rest/springboot/RestConfigurationDefinitionProperties.java
b/components-starter/camel-core-starter/src/main/java/org/apache/camel/model/rest/springboot/RestConfigurationDefinitionProperties.java
index b9ede39f8d5..28d91a7e30d 100644
---
a/components-starter/camel-core-starter/src/main/java/org/apache/camel/model/rest/springboot/RestConfigurationDefinitionProperties.java
+++
b/components-starter/camel-core-starter/src/main/java/org/apache/camel/model/rest/springboot/RestConfigurationDefinitionProperties.java
@@ -182,17 +182,18 @@ public class RestConfigurationDefinitionProperties {
*/
private Boolean inlineRoutes = true;
/**
- * Name of specific json data format to use. By default jackson will be
+ * Name of specific json data format to use. By default, jackson 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.
*/
- private String jsonDataFormat;
+ private String jsonDataFormat = "jackson";
/**
- * 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.
+ * Name of specific XML data format to use. By default jaxb will be used,
+ * but jacksonXml is also supported. Important: This option is only for
+ * setting a custom name of the data format, not to refer to an existing
+ * data format instance.
*/
- private String xmlDataFormat;
+ private String xmlDataFormat = "jaxb";
/**
* Allows to configure as many additional properties for the rest component
* in use.