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 5a09f7df662 Regen
5a09f7df662 is described below
commit 5a09f7df662ad86fdb6e1959a3d7e520a255359b
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Oct 16 15:05:53 2025 +0200
Regen
---
.../springboot/catalog/components/graphql.json | 34 ++++++++++++----------
.../src/main/docs/graphql.json | 13 +++++++++
.../springboot/GraphqlComponentConfiguration.java | 30 +++++++++++++++++++
.../springboot/GraphqlComponentConverter.java | 2 ++
4 files changed, 64 insertions(+), 15 deletions(-)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/graphql.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/graphql.json
index 1871d6598c7..739a16fb48a 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/graphql.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/graphql.json
@@ -25,23 +25,27 @@
},
"componentProperties": {
"lazyStartProducer": { "index": 0, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fail [...]
- "autowiredEnabled": { "index": 1, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
- "httpClient": { "index": 2, "kind": "property", "displayName": "Http
Client", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "org.apache.hc.client5.http.classic.HttpClient",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom pre-existing Http Client. Beware that when using this, then other
configurations such as proxy, access token, is not applied and all this must be
pre-configured on the Http Client." }
+ "throwExceptionOnFailure": { "index": 1, "kind": "property",
"displayName": "Throw Exception On Failure", "group": "producer", "label":
"producer", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"description": "Option to disable throwing the HttpOperationFailedException in
case of failed responses from the remote server. This allows you to get all
responses regardless of the HTTP status code." },
+ "autowiredEnabled": { "index": 2, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
+ "httpClient": { "index": 3, "kind": "property", "displayName": "Http
Client", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "org.apache.hc.client5.http.classic.HttpClient",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom pre-existing Http Client. Beware that when using this, then other
configurations such as proxy, access token, is not applied and all this must be
pre-configured on the Http Client." },
+ "headerFilterStrategy": { "index": 4, "kind": "property", "displayName":
"Header Filter Strategy", "group": "filter", "label": "filter", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom
org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel
message." }
},
"properties": {
"httpUri": { "index": 0, "kind": "path", "displayName": "Http Uri",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.net.URI", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The GraphQL server URI." },
- "operationName": { "index": 1, "kind": "parameter", "displayName":
"Operation Name", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The query or mutation name." },
- "proxyHost": { "index": 2, "kind": "parameter", "displayName": "Proxy
Host", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The proxy host in the format hostname:port." },
- "query": { "index": 3, "kind": "parameter", "displayName": "Query",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The query text." },
- "queryFile": { "index": 4, "kind": "parameter", "displayName": "Query
File", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The query file name located in the classpath
(or use file: to load from file system)." },
- "queryHeader": { "index": 5, "kind": "parameter", "displayName": "Query
Header", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The name of a header containing the GraphQL
query." },
- "variables": { "index": 6, "kind": "parameter", "displayName":
"Variables", "group": "producer", "label": "", "required": false, "type":
"object", "javaType": "org.apache.camel.util.json.JsonObject", "deprecated":
false, "autowired": false, "secret": false, "description": "The JsonObject
instance containing the operation variables." },
- "variablesHeader": { "index": 7, "kind": "parameter", "displayName":
"Variables Header", "group": "producer", "label": "", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "The name of a header
containing a JsonObject instance containing the operation variables." },
- "lazyStartProducer": { "index": 8, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produc [...]
- "httpClient": { "index": 9, "kind": "parameter", "displayName": "Http
Client", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "org.apache.hc.client5.http.classic.HttpClient",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom pre-existing Http Client. Beware that when using this, then other
configurations such as proxy, access token, is not applied and all this must be
pre-configured on the Http Client." },
- "accessToken": { "index": 10, "kind": "parameter", "displayName": "Access
Token", "group": "security", "label": "security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "description": "The access token sent in the
Authorization header." },
- "jwtAuthorizationType": { "index": 11, "kind": "parameter", "displayName":
"Jwt Authorization Type", "group": "security", "label": "security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "Bearer", "description":
"The JWT Authorization type. Default is Bearer." },
- "password": { "index": 12, "kind": "parameter", "displayName": "Password",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "description": "The password for Basic authentication." },
- "username": { "index": 13, "kind": "parameter", "displayName": "Username",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "description": "The username for Basic authentication." }
+ "headerFilterStrategy": { "index": 1, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "common (advanced)", "label":
"common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter header to and from Camel message." },
+ "operationName": { "index": 2, "kind": "parameter", "displayName":
"Operation Name", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The query or mutation name." },
+ "proxyHost": { "index": 3, "kind": "parameter", "displayName": "Proxy
Host", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The proxy host in the format hostname:port." },
+ "query": { "index": 4, "kind": "parameter", "displayName": "Query",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The query text." },
+ "queryFile": { "index": 5, "kind": "parameter", "displayName": "Query
File", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The query file name located in the classpath
(or use file: to load from file system)." },
+ "queryHeader": { "index": 6, "kind": "parameter", "displayName": "Query
Header", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The name of a header containing the GraphQL
query." },
+ "throwExceptionOnFailure": { "index": 7, "kind": "parameter",
"displayName": "Throw Exception On Failure", "group": "producer", "label":
"producer", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"description": "Option to disable throwing the HttpOperationFailedException in
case of failed responses from the remote server. This allows you to get all
responses regardless of the HTTP status code." },
+ "variables": { "index": 8, "kind": "parameter", "displayName":
"Variables", "group": "producer", "label": "", "required": false, "type":
"object", "javaType": "org.apache.camel.util.json.JsonObject", "deprecated":
false, "autowired": false, "secret": false, "description": "The JsonObject
instance containing the operation variables." },
+ "variablesHeader": { "index": 9, "kind": "parameter", "displayName":
"Variables Header", "group": "producer", "label": "", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "The name of a header
containing a JsonObject instance containing the operation variables." },
+ "lazyStartProducer": { "index": 10, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
+ "httpClient": { "index": 11, "kind": "parameter", "displayName": "Http
Client", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "org.apache.hc.client5.http.classic.HttpClient",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom pre-existing Http Client. Beware that when using this, then other
configurations such as proxy, access token, is not applied and all this must be
pre-configured on the Http Client." },
+ "accessToken": { "index": 12, "kind": "parameter", "displayName": "Access
Token", "group": "security", "label": "security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "description": "The access token sent in the
Authorization header." },
+ "jwtAuthorizationType": { "index": 13, "kind": "parameter", "displayName":
"Jwt Authorization Type", "group": "security", "label": "security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "Bearer", "description":
"The JWT Authorization type. Default is Bearer." },
+ "password": { "index": 14, "kind": "parameter", "displayName": "Password",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "description": "The password for Basic authentication." },
+ "username": { "index": 15, "kind": "parameter", "displayName": "Username",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "description": "The username for Basic authentication." }
}
}
diff --git
a/components-starter/camel-graphql-starter/src/main/docs/graphql.json
b/components-starter/camel-graphql-starter/src/main/docs/graphql.json
index 0bf56ebea59..9fd37a932bf 100644
--- a/components-starter/camel-graphql-starter/src/main/docs/graphql.json
+++ b/components-starter/camel-graphql-starter/src/main/docs/graphql.json
@@ -31,6 +31,12 @@
"description": "Whether to enable auto configuration of the graphql
component. This is enabled by default.",
"sourceType":
"org.apache.camel.component.graphql.springboot.GraphqlComponentConfiguration"
},
+ {
+ "name": "camel.component.graphql.header-filter-strategy",
+ "type": "org.apache.camel.spi.HeaderFilterStrategy",
+ "description": "To use a custom
org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel
message. The option is a org.apache.camel.spi.HeaderFilterStrategy type.",
+ "sourceType":
"org.apache.camel.component.graphql.springboot.GraphqlComponentConfiguration"
+ },
{
"name": "camel.component.graphql.http-client",
"type": "org.apache.hc.client5.http.classic.HttpClient",
@@ -43,6 +49,13 @@
"description": "Whether the producer should be started lazy (on the
first message). By starting lazy you can use this to allow CamelContext and
routes to startup in situations where a producer may otherwise fail during
starting and cause the route to fail being started. By deferring this startup
to be lazy then the startup failure can be handled during routing messages via
Camel's routing error handlers. Beware that when the first message is processed
then creating and starting the [...]
"sourceType":
"org.apache.camel.component.graphql.springboot.GraphqlComponentConfiguration",
"defaultValue": false
+ },
+ {
+ "name": "camel.component.graphql.throw-exception-on-failure",
+ "type": "java.lang.Boolean",
+ "description": "Option to disable throwing the
HttpOperationFailedException in case of failed responses from the remote
server. This allows you to get all responses regardless of the HTTP status
code.",
+ "sourceType":
"org.apache.camel.component.graphql.springboot.GraphqlComponentConfiguration",
+ "defaultValue": true
}
],
"hints": [],
diff --git
a/components-starter/camel-graphql-starter/src/main/java/org/apache/camel/component/graphql/springboot/GraphqlComponentConfiguration.java
b/components-starter/camel-graphql-starter/src/main/java/org/apache/camel/component/graphql/springboot/GraphqlComponentConfiguration.java
index 766de576b7b..e55a13b8795 100644
---
a/components-starter/camel-graphql-starter/src/main/java/org/apache/camel/component/graphql/springboot/GraphqlComponentConfiguration.java
+++
b/components-starter/camel-graphql-starter/src/main/java/org/apache/camel/component/graphql/springboot/GraphqlComponentConfiguration.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.component.graphql.springboot;
+import org.apache.camel.spi.HeaderFilterStrategy;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
import org.apache.hc.client5.http.classic.HttpClient;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -46,6 +47,12 @@ public class GraphqlComponentConfiguration
* and prolong the total processing time of the processing.
*/
private Boolean lazyStartProducer = false;
+ /**
+ * Option to disable throwing the HttpOperationFailedException in case of
+ * failed responses from the remote server. This allows you to get all
+ * responses regardless of the HTTP status code.
+ */
+ private Boolean throwExceptionOnFailure = true;
/**
* Whether autowiring is enabled. This is used for automatic autowiring
* options (the option must be marked as autowired) by looking up in the
@@ -62,6 +69,12 @@ public class GraphqlComponentConfiguration
* org.apache.hc.client5.http.classic.HttpClient type.
*/
private HttpClient httpClient;
+ /**
+ * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter
+ * header to and from Camel message. The option is a
+ * org.apache.camel.spi.HeaderFilterStrategy type.
+ */
+ private HeaderFilterStrategy headerFilterStrategy;
public Boolean getLazyStartProducer() {
return lazyStartProducer;
@@ -71,6 +84,14 @@ public class GraphqlComponentConfiguration
this.lazyStartProducer = lazyStartProducer;
}
+ public Boolean getThrowExceptionOnFailure() {
+ return throwExceptionOnFailure;
+ }
+
+ public void setThrowExceptionOnFailure(Boolean throwExceptionOnFailure) {
+ this.throwExceptionOnFailure = throwExceptionOnFailure;
+ }
+
public Boolean getAutowiredEnabled() {
return autowiredEnabled;
}
@@ -86,4 +107,13 @@ public class GraphqlComponentConfiguration
public void setHttpClient(HttpClient httpClient) {
this.httpClient = httpClient;
}
+
+ public HeaderFilterStrategy getHeaderFilterStrategy() {
+ return headerFilterStrategy;
+ }
+
+ public void setHeaderFilterStrategy(
+ HeaderFilterStrategy headerFilterStrategy) {
+ this.headerFilterStrategy = headerFilterStrategy;
+ }
}
\ No newline at end of file
diff --git
a/components-starter/camel-graphql-starter/src/main/java/org/apache/camel/component/graphql/springboot/GraphqlComponentConverter.java
b/components-starter/camel-graphql-starter/src/main/java/org/apache/camel/component/graphql/springboot/GraphqlComponentConverter.java
index 86a9844af71..6f50f6a970b 100644
---
a/components-starter/camel-graphql-starter/src/main/java/org/apache/camel/component/graphql/springboot/GraphqlComponentConverter.java
+++
b/components-starter/camel-graphql-starter/src/main/java/org/apache/camel/component/graphql/springboot/GraphqlComponentConverter.java
@@ -40,6 +40,7 @@ public class GraphqlComponentConverter implements
GenericConverter {
public Set<ConvertiblePair> getConvertibleTypes() {
Set<ConvertiblePair> answer = new LinkedHashSet<>();
answer.add(new ConvertiblePair(String.class,
org.apache.hc.client5.http.classic.HttpClient.class));
+ answer.add(new ConvertiblePair(String.class,
org.apache.camel.spi.HeaderFilterStrategy.class));
return answer;
}
@@ -57,6 +58,7 @@ public class GraphqlComponentConverter implements
GenericConverter {
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "org.apache.hc.client5.http.classic.HttpClient": return
applicationContext.getBean(ref,
org.apache.hc.client5.http.classic.HttpClient.class);
+ case "org.apache.camel.spi.HeaderFilterStrategy": return
applicationContext.getBean(ref,
org.apache.camel.spi.HeaderFilterStrategy.class);
}
return null;
}