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.git

commit 566896bcd5bf2df339f464e2d171339b53868f85
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Fri Nov 10 19:27:52 2023 +0100

    CAMEL-20102: camel-vertx-http - Make configuring http method tooling 
friendly
---
 .../org/apache/camel/catalog/components/vertx-http.json        |  2 +-
 .../org/apache/camel/component/vertx/http/vertx-http.json      |  2 +-
 .../camel/component/vertx/http/VertxHttpConfiguration.java     | 10 +++++++++-
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx-http.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx-http.json
index 6a2ce300a1f..6d4e8123895 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx-http.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx-http.json
@@ -57,7 +57,7 @@
     "connectTimeout": { "index": 1, "kind": "parameter", "displayName": 
"Connect Timeout", "group": "producer", "label": "producer", "required": false, 
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 60000, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The amount of time in 
milliseconds until a connection is established. A timeout  [...]
     "cookieStore": { "index": 2, "kind": "parameter", "displayName": "Cookie 
Store", "group": "producer", "label": "producer", "required": false, "type": 
"object", "javaType": "io.vertx.ext.web.client.spi.CookieStore", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": 
"InMemoryCookieStore", "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "A custom CookieStore to 
use when se [...]
     "headerFilterStrategy": { "index": 3, "kind": "parameter", "displayName": 
"Header Filter Strategy", "group": "producer", "label": "producer", "required": 
false, "type": "object", "javaType": 
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "VertxHttpHeaderFilterStrategy", 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "A cu [...]
-    "httpMethod": { "index": 4, "kind": "parameter", "displayName": "Http 
Method", "group": "producer", "label": "producer", "required": false, "type": 
"object", "javaType": "io.vertx.core.http.HttpMethod", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The HTTP method to use. 
The HttpMethod header cannot override this option if set" },
+    "httpMethod": { "index": 4, "kind": "parameter", "displayName": "Http 
Method", "group": "producer", "label": "producer", "required": false, "type": 
"object", "javaType": "io.vertx.core.http.HttpMethod", "enum": [ "OPTIONS", 
"GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT", "PATCH", 
"PROPFIND", "PROPPATCH", "MKCOL", "COPY", "MOVE", "LOCK", "UNLOCK", 
"MKCALENDAR", "VERSION_CONTROL", "REPORT", "CHECKIN", "CHECKOUT", "UNCHECKOUT", 
"MKWORKSPACE", "UPDATE", "LABEL", "MERGE", "BAS [...]
     "okStatusCodeRange": { "index": 5, "kind": "parameter", "displayName": "Ok 
Status Code Range", "group": "producer", "label": "producer", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "200-299", 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The status codes which 
are considered a success response [...]
     "responsePayloadAsByteArray": { "index": 6, "kind": "parameter", 
"displayName": "Response Payload As Byte Array", "group": "producer", "label": 
"producer", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "Whether the response 
body should be byte or as io. [...]
     "sessionManagement": { "index": 7, "kind": "parameter", "displayName": 
"Session Management", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "Enables session 
management via WebClientSession. By default the client [...]
diff --git 
a/components/camel-vertx/camel-vertx-http/src/generated/resources/org/apache/camel/component/vertx/http/vertx-http.json
 
b/components/camel-vertx/camel-vertx-http/src/generated/resources/org/apache/camel/component/vertx/http/vertx-http.json
index 6a2ce300a1f..6d4e8123895 100644
--- 
a/components/camel-vertx/camel-vertx-http/src/generated/resources/org/apache/camel/component/vertx/http/vertx-http.json
+++ 
b/components/camel-vertx/camel-vertx-http/src/generated/resources/org/apache/camel/component/vertx/http/vertx-http.json
@@ -57,7 +57,7 @@
     "connectTimeout": { "index": 1, "kind": "parameter", "displayName": 
"Connect Timeout", "group": "producer", "label": "producer", "required": false, 
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 60000, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The amount of time in 
milliseconds until a connection is established. A timeout  [...]
     "cookieStore": { "index": 2, "kind": "parameter", "displayName": "Cookie 
Store", "group": "producer", "label": "producer", "required": false, "type": 
"object", "javaType": "io.vertx.ext.web.client.spi.CookieStore", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": 
"InMemoryCookieStore", "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "A custom CookieStore to 
use when se [...]
     "headerFilterStrategy": { "index": 3, "kind": "parameter", "displayName": 
"Header Filter Strategy", "group": "producer", "label": "producer", "required": 
false, "type": "object", "javaType": 
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "VertxHttpHeaderFilterStrategy", 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "A cu [...]
-    "httpMethod": { "index": 4, "kind": "parameter", "displayName": "Http 
Method", "group": "producer", "label": "producer", "required": false, "type": 
"object", "javaType": "io.vertx.core.http.HttpMethod", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The HTTP method to use. 
The HttpMethod header cannot override this option if set" },
+    "httpMethod": { "index": 4, "kind": "parameter", "displayName": "Http 
Method", "group": "producer", "label": "producer", "required": false, "type": 
"object", "javaType": "io.vertx.core.http.HttpMethod", "enum": [ "OPTIONS", 
"GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT", "PATCH", 
"PROPFIND", "PROPPATCH", "MKCOL", "COPY", "MOVE", "LOCK", "UNLOCK", 
"MKCALENDAR", "VERSION_CONTROL", "REPORT", "CHECKIN", "CHECKOUT", "UNCHECKOUT", 
"MKWORKSPACE", "UPDATE", "LABEL", "MERGE", "BAS [...]
     "okStatusCodeRange": { "index": 5, "kind": "parameter", "displayName": "Ok 
Status Code Range", "group": "producer", "label": "producer", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "200-299", 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The status codes which 
are considered a success response [...]
     "responsePayloadAsByteArray": { "index": 6, "kind": "parameter", 
"displayName": "Response Payload As Byte Array", "group": "producer", "label": 
"producer", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "Whether the response 
body should be byte or as io. [...]
     "sessionManagement": { "index": 7, "kind": "parameter", "displayName": 
"Session Management", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "Enables session 
management via WebClientSession. By default the client [...]
diff --git 
a/components/camel-vertx/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpConfiguration.java
 
b/components/camel-vertx/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpConfiguration.java
index 36be1f8a0b8..7046640005c 100644
--- 
a/components/camel-vertx/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpConfiguration.java
+++ 
b/components/camel-vertx/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpConfiguration.java
@@ -36,7 +36,8 @@ public class VertxHttpConfiguration {
     @UriPath(name = "httpUri")
     @Metadata(required = true)
     private URI httpUri;
-    @UriParam(label = "producer")
+    @UriParam(label = "producer",
+              enums = 
"OPTIONS,GET,HEAD,POST,PUT,DELETE,TRACE,CONNECT,PATCH,PROPFIND,PROPPATCH,MKCOL,COPY,MOVE,LOCK,UNLOCK,MKCALENDAR,VERSION_CONTROL,REPORT,CHECKIN,CHECKOUT,UNCHECKOUT,MKWORKSPACE,UPDATE,LABEL,MERGE,BASELINE_CONTROL,MKACTIVITY,ORDERPATCH,ACL,SEARCH")
     private HttpMethod httpMethod;
     @UriParam(label = "producer", defaultValue = "-1")
     private long timeout = -1;
@@ -99,6 +100,13 @@ public class VertxHttpConfiguration {
         this.httpMethod = httpMethod;
     }
 
+    /**
+     * The HTTP method to use. The HttpMethod header cannot override this 
option if set
+     */
+    public void setHttpMethod(String httpMethod) {
+        this.httpMethod = HttpMethod.valueOf(httpMethod);
+    }
+
     public HttpMethod getHttpMethod() {
         return httpMethod;
     }

Reply via email to