You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/10/13 09:18:09 UTC

[camel] 03/03: CAMEL-15660: Fixed json schema generator to output default values in valid json type for boolean, int, number types.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 41c208b3ccb5d337e920e0547871f3738c2e81b7
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Oct 13 11:16:41 2020 +0200

    CAMEL-15660: Fixed json schema generator to output default values in valid json type for boolean,int,number types.
---
 .../resources/org/apache/camel/catalog/docs/pdf-component.adoc        | 2 +-
 .../camel/component/chatscript/ChatScriptEndpointUriFactory.java      | 2 +-
 .../apache/camel/component/couchbase/CouchbaseEndpointUriFactory.java | 2 +-
 .../org/apache/camel/component/couchdb/CouchDbEndpointUriFactory.java | 2 +-
 .../org/apache/camel/component/ganglia/GangliaEndpointUriFactory.java | 2 +-
 .../java/org/apache/camel/component/hdfs/HdfsEndpointUriFactory.java  | 2 +-
 .../camel/component/lumberjack/LumberjackEndpointUriFactory.java      | 2 +-
 components/camel-pdf/src/main/docs/pdf-component.adoc                 | 2 +-
 .../java/org/apache/camel/component/ssh/SshEndpointUriFactory.java    | 2 +-
 .../component/vertx/websocket/VertxWebsocketEndpointUriFactory.java   | 2 +-
 .../apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java  | 4 ++--
 docs/components/modules/ROOT/pages/pdf-component.adoc                 | 2 +-
 12 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pdf-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pdf-component.adoc
index 3ac66f3..9e5addc 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pdf-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pdf-component.adoc
@@ -84,7 +84,7 @@ with the following path and query parameters:
 |===
 | Name | Description | Default | Type
 | *font* (producer) | Font. There are 14 enums and the value can be one of: Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, Symbol, ZapfDingbats | Helvetica | String
-| *fontSize* (producer) | Font size in pixels | 14 | float
+| *fontSize* (producer) | Font size in pixels | 14.0 | float
 | *lazyStartProducer* (producer) | 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 [...]
 | *marginBottom* (producer) | Margin bottom in pixels | 20 | int
 | *marginLeft* (producer) | Margin left in pixels | 20 | int
diff --git a/components/camel-chatscript/src/generated/java/org/apache/camel/component/chatscript/ChatScriptEndpointUriFactory.java b/components/camel-chatscript/src/generated/java/org/apache/camel/component/chatscript/ChatScriptEndpointUriFactory.java
index ee49f16..1ae9098 100644
--- a/components/camel-chatscript/src/generated/java/org/apache/camel/component/chatscript/ChatScriptEndpointUriFactory.java
+++ b/components/camel-chatscript/src/generated/java/org/apache/camel/component/chatscript/ChatScriptEndpointUriFactory.java
@@ -46,7 +46,7 @@ public class ChatScriptEndpointUriFactory extends org.apache.camel.support.compo
         Map<String, Object> copy = new HashMap<>(properties);
 
         uri = buildPathParameter(syntax, uri, "host", null, true, copy);
-        uri = buildPathParameter(syntax, uri, "port", "1024", false, copy);
+        uri = buildPathParameter(syntax, uri, "port", 1024, false, copy);
         uri = buildPathParameter(syntax, uri, "botName", null, true, copy);
         uri = buildQueryParameters(uri, copy);
         return uri;
diff --git a/components/camel-couchbase/src/generated/java/org/apache/camel/component/couchbase/CouchbaseEndpointUriFactory.java b/components/camel-couchbase/src/generated/java/org/apache/camel/component/couchbase/CouchbaseEndpointUriFactory.java
index 1c552a1..c0017cf 100644
--- a/components/camel-couchbase/src/generated/java/org/apache/camel/component/couchbase/CouchbaseEndpointUriFactory.java
+++ b/components/camel-couchbase/src/generated/java/org/apache/camel/component/couchbase/CouchbaseEndpointUriFactory.java
@@ -90,7 +90,7 @@ public class CouchbaseEndpointUriFactory extends org.apache.camel.support.compon
 
         uri = buildPathParameter(syntax, uri, "protocol", null, true, copy);
         uri = buildPathParameter(syntax, uri, "hostname", null, true, copy);
-        uri = buildPathParameter(syntax, uri, "port", "8091", false, copy);
+        uri = buildPathParameter(syntax, uri, "port", 8091, false, copy);
         uri = buildQueryParameters(uri, copy);
         return uri;
     }
diff --git a/components/camel-couchdb/src/generated/java/org/apache/camel/component/couchdb/CouchDbEndpointUriFactory.java b/components/camel-couchdb/src/generated/java/org/apache/camel/component/couchdb/CouchDbEndpointUriFactory.java
index f684b49..73faf6b 100644
--- a/components/camel-couchdb/src/generated/java/org/apache/camel/component/couchdb/CouchDbEndpointUriFactory.java
+++ b/components/camel-couchdb/src/generated/java/org/apache/camel/component/couchdb/CouchDbEndpointUriFactory.java
@@ -60,7 +60,7 @@ public class CouchDbEndpointUriFactory extends org.apache.camel.support.componen
 
         uri = buildPathParameter(syntax, uri, "protocol", null, true, copy);
         uri = buildPathParameter(syntax, uri, "hostname", null, true, copy);
-        uri = buildPathParameter(syntax, uri, "port", "5984", false, copy);
+        uri = buildPathParameter(syntax, uri, "port", 5984, false, copy);
         uri = buildPathParameter(syntax, uri, "database", null, true, copy);
         uri = buildQueryParameters(uri, copy);
         return uri;
diff --git a/components/camel-ganglia/src/generated/java/org/apache/camel/component/ganglia/GangliaEndpointUriFactory.java b/components/camel-ganglia/src/generated/java/org/apache/camel/component/ganglia/GangliaEndpointUriFactory.java
index 1efb223..e071282 100644
--- a/components/camel-ganglia/src/generated/java/org/apache/camel/component/ganglia/GangliaEndpointUriFactory.java
+++ b/components/camel-ganglia/src/generated/java/org/apache/camel/component/ganglia/GangliaEndpointUriFactory.java
@@ -55,7 +55,7 @@ public class GangliaEndpointUriFactory extends org.apache.camel.support.componen
         Map<String, Object> copy = new HashMap<>(properties);
 
         uri = buildPathParameter(syntax, uri, "host", "239.2.11.71", false, copy);
-        uri = buildPathParameter(syntax, uri, "port", "8649", false, copy);
+        uri = buildPathParameter(syntax, uri, "port", 8649, false, copy);
         uri = buildQueryParameters(uri, copy);
         return uri;
     }
diff --git a/components/camel-hdfs/src/generated/java/org/apache/camel/component/hdfs/HdfsEndpointUriFactory.java b/components/camel-hdfs/src/generated/java/org/apache/camel/component/hdfs/HdfsEndpointUriFactory.java
index c79abb8..9e3fff9 100644
--- a/components/camel-hdfs/src/generated/java/org/apache/camel/component/hdfs/HdfsEndpointUriFactory.java
+++ b/components/camel-hdfs/src/generated/java/org/apache/camel/component/hdfs/HdfsEndpointUriFactory.java
@@ -88,7 +88,7 @@ public class HdfsEndpointUriFactory extends org.apache.camel.support.component.E
         Map<String, Object> copy = new HashMap<>(properties);
 
         uri = buildPathParameter(syntax, uri, "hostName", null, true, copy);
-        uri = buildPathParameter(syntax, uri, "port", "8020", false, copy);
+        uri = buildPathParameter(syntax, uri, "port", 8020, false, copy);
         uri = buildPathParameter(syntax, uri, "path", null, true, copy);
         uri = buildQueryParameters(uri, copy);
         return uri;
diff --git a/components/camel-lumberjack/src/generated/java/org/apache/camel/component/lumberjack/LumberjackEndpointUriFactory.java b/components/camel-lumberjack/src/generated/java/org/apache/camel/component/lumberjack/LumberjackEndpointUriFactory.java
index ab89893..64f0cac 100644
--- a/components/camel-lumberjack/src/generated/java/org/apache/camel/component/lumberjack/LumberjackEndpointUriFactory.java
+++ b/components/camel-lumberjack/src/generated/java/org/apache/camel/component/lumberjack/LumberjackEndpointUriFactory.java
@@ -46,7 +46,7 @@ public class LumberjackEndpointUriFactory extends org.apache.camel.support.compo
         Map<String, Object> copy = new HashMap<>(properties);
 
         uri = buildPathParameter(syntax, uri, "host", null, true, copy);
-        uri = buildPathParameter(syntax, uri, "port", "5044", false, copy);
+        uri = buildPathParameter(syntax, uri, "port", 5044, false, copy);
         uri = buildQueryParameters(uri, copy);
         return uri;
     }
diff --git a/components/camel-pdf/src/main/docs/pdf-component.adoc b/components/camel-pdf/src/main/docs/pdf-component.adoc
index 3ac66f3..9e5addc 100644
--- a/components/camel-pdf/src/main/docs/pdf-component.adoc
+++ b/components/camel-pdf/src/main/docs/pdf-component.adoc
@@ -84,7 +84,7 @@ with the following path and query parameters:
 |===
 | Name | Description | Default | Type
 | *font* (producer) | Font. There are 14 enums and the value can be one of: Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, Symbol, ZapfDingbats | Helvetica | String
-| *fontSize* (producer) | Font size in pixels | 14 | float
+| *fontSize* (producer) | Font size in pixels | 14.0 | float
 | *lazyStartProducer* (producer) | 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 [...]
 | *marginBottom* (producer) | Margin bottom in pixels | 20 | int
 | *marginLeft* (producer) | Margin left in pixels | 20 | int
diff --git a/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointUriFactory.java b/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointUriFactory.java
index 0248cc4..6a43d7a 100644
--- a/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointUriFactory.java
+++ b/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointUriFactory.java
@@ -79,7 +79,7 @@ public class SshEndpointUriFactory extends org.apache.camel.support.component.En
         Map<String, Object> copy = new HashMap<>(properties);
 
         uri = buildPathParameter(syntax, uri, "host", null, true, copy);
-        uri = buildPathParameter(syntax, uri, "port", "22", false, copy);
+        uri = buildPathParameter(syntax, uri, "port", 22, false, copy);
         uri = buildQueryParameters(uri, copy);
         return uri;
     }
diff --git a/components/camel-vertx-websocket/src/generated/java/org/apache/camel/component/vertx/websocket/VertxWebsocketEndpointUriFactory.java b/components/camel-vertx-websocket/src/generated/java/org/apache/camel/component/vertx/websocket/VertxWebsocketEndpointUriFactory.java
index 80ce5b4..cb59a44 100644
--- a/components/camel-vertx-websocket/src/generated/java/org/apache/camel/component/vertx/websocket/VertxWebsocketEndpointUriFactory.java
+++ b/components/camel-vertx-websocket/src/generated/java/org/apache/camel/component/vertx/websocket/VertxWebsocketEndpointUriFactory.java
@@ -53,7 +53,7 @@ public class VertxWebsocketEndpointUriFactory extends org.apache.camel.support.c
         Map<String, Object> copy = new HashMap<>(properties);
 
         uri = buildPathParameter(syntax, uri, "host", "0.0.0.0", false, copy);
-        uri = buildPathParameter(syntax, uri, "port", "0", false, copy);
+        uri = buildPathParameter(syntax, uri, "port", 0, false, copy);
         uri = buildPathParameter(syntax, uri, "path", "/", true, copy);
         uri = buildQueryParameters(uri, copy);
         return uri;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java
index 04ee09b..8c2c3c4 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java
@@ -54,7 +54,7 @@ public interface PdfEndpointBuilderFactory {
          * 
          * The option is a: <code>float</code> type.
          * 
-         * Default: 14
+         * Default: 14.0
          * Group: producer
          */
         default PdfEndpointBuilder fontSize(float fontSize) {
@@ -66,7 +66,7 @@ public interface PdfEndpointBuilderFactory {
          * 
          * The option will be converted to a <code>float</code> type.
          * 
-         * Default: 14
+         * Default: 14.0
          * Group: producer
          */
         default PdfEndpointBuilder fontSize(String fontSize) {
diff --git a/docs/components/modules/ROOT/pages/pdf-component.adoc b/docs/components/modules/ROOT/pages/pdf-component.adoc
index e29aff7..47ca511 100644
--- a/docs/components/modules/ROOT/pages/pdf-component.adoc
+++ b/docs/components/modules/ROOT/pages/pdf-component.adoc
@@ -86,7 +86,7 @@ with the following path and query parameters:
 |===
 | Name | Description | Default | Type
 | *font* (producer) | Font. There are 14 enums and the value can be one of: Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, Symbol, ZapfDingbats | Helvetica | String
-| *fontSize* (producer) | Font size in pixels | 14 | float
+| *fontSize* (producer) | Font size in pixels | 14.0 | float
 | *lazyStartProducer* (producer) | 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 [...]
 | *marginBottom* (producer) | Margin bottom in pixels | 20 | int
 | *marginLeft* (producer) | Margin left in pixels | 20 | int