This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-23816 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 96cbed9a1b364b824d7209432f7f00bebc1acc87 Author: Claus Ibsen <[email protected]> AuthorDate: Tue Jun 23 15:36:34 2026 +0200 CAMEL-23816: Improve descriptions in resilience, rest, language, and dataformat model classes for catalog and MCP tools Co-Authored-By: Claude Opus 4.6 <[email protected]> --- .../model/FaultToleranceConfigurationCommon.java | 38 ++++++---- .../model/Resilience4jConfigurationCommon.java | 78 ++++++++++++++------ .../camel/model/dataformat/ASN1DataFormat.java | 4 +- .../camel/model/dataformat/AvroDataFormat.java | 34 +++++---- .../camel/model/dataformat/BarcodeDataFormat.java | 12 ++-- .../camel/model/dataformat/Base64DataFormat.java | 9 ++- .../camel/model/dataformat/BeanioDataFormat.java | 15 ++-- .../camel/model/dataformat/BindyDataFormat.java | 15 ++-- .../camel/model/dataformat/CBORDataFormat.java | 20 ++++-- .../camel/model/dataformat/CryptoDataFormat.java | 21 +++--- .../camel/model/dataformat/CsvDataFormat.java | 60 ++++++++++------ .../camel/model/dataformat/FhirDataformat.java | 55 +++++++++----- .../camel/model/dataformat/FlatpackDataFormat.java | 19 +++-- .../camel/model/dataformat/JaxbDataFormat.java | 46 ++++++++---- .../camel/model/dataformat/JsonDataFormat.java | 58 ++++++++++----- .../camel/model/dataformat/PGPDataFormat.java | 18 +++-- .../camel/model/dataformat/ProtobufDataFormat.java | 35 +++++---- .../camel/model/dataformat/SoapDataFormat.java | 13 ++-- .../dataformat/UniVocityAbstractDataFormat.java | 36 ++++++---- .../model/dataformat/UniVocityCsvDataFormat.java | 9 +-- .../model/dataformat/XMLSecurityDataFormat.java | 32 ++++++--- .../camel/model/dataformat/YAMLDataFormat.java | 27 ++++--- .../camel/model/dataformat/ZipFileDataFormat.java | 14 ++-- .../camel/model/language/CSimpleExpression.java | 6 +- .../camel/model/language/ExpressionDefinition.java | 5 +- .../camel/model/language/JavaExpression.java | 6 +- .../camel/model/language/JoorExpression.java | 6 +- .../camel/model/language/JsonPathExpression.java | 18 +++-- .../camel/model/language/MethodCallExpression.java | 6 +- .../model/language/NamespaceAwareExpression.java | 2 +- .../camel/model/language/SimpleExpression.java | 9 ++- .../camel/model/language/TokenizerExpression.java | 21 ++++-- .../camel/model/language/WasmExpression.java | 3 +- .../model/language/XMLTokenizerExpression.java | 5 +- .../camel/model/language/XPathExpression.java | 20 +++--- .../camel/model/language/XQueryExpression.java | 3 +- .../apache/camel/model/rest/ApiKeyDefinition.java | 12 ++-- .../apache/camel/model/rest/OAuth2Definition.java | 3 +- .../apache/camel/model/rest/OpenApiDefinition.java | 9 ++- .../apache/camel/model/rest/ParamDefinition.java | 15 ++-- .../camel/model/rest/ResponseHeaderDefinition.java | 9 ++- .../model/rest/ResponseMessageDefinition.java | 3 +- .../camel/model/rest/RestBindingDefinition.java | 27 ++++--- .../model/rest/RestConfigurationDefinition.java | 84 ++++++++++++++-------- .../apache/camel/model/rest/RestDefinition.java | 33 ++++++--- .../camel/model/rest/RestSecurityDefinition.java | 3 +- .../camel/model/rest/SecurityDefinition.java | 3 +- .../apache/camel/model/rest/VerbDefinition.java | 36 ++++++---- 48 files changed, 671 insertions(+), 344 deletions(-) diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationCommon.java b/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationCommon.java index 480eb567959c..908603db293f 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationCommon.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationCommon.java @@ -26,40 +26,54 @@ import org.apache.camel.spi.Metadata; public class FaultToleranceConfigurationCommon extends IdentifiedType { @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Refers to an existing io.smallrye.faulttolerance.api.TypedGuard instance to lookup and use from the registry." + + " When using this, then any other TypedGuard circuit breaker options are not in use.") private String typedGuard; @XmlAttribute - @Metadata(defaultValue = "5000", javaType = "java.time.Duration") + @Metadata(defaultValue = "5000", javaType = "java.time.Duration", + description = "Control how long the circuit breaker stays open. The default is 5 seconds.") private String delay; @XmlAttribute - @Metadata(defaultValue = "1", javaType = "java.lang.Integer") + @Metadata(defaultValue = "1", javaType = "java.lang.Integer", + description = "Controls the number of trial calls which are allowed when the circuit breaker is half-open.") private String successThreshold; @XmlAttribute - @Metadata(defaultValue = "20", javaType = "java.lang.Integer") + @Metadata(defaultValue = "20", javaType = "java.lang.Integer", + description = "Controls the size of the rolling window used when the circuit breaker is closed.") private String requestVolumeThreshold; @XmlAttribute - @Metadata(defaultValue = "50", javaType = "java.lang.Integer") + @Metadata(defaultValue = "50", javaType = "java.lang.Integer", + description = "Configures the failure rate threshold in percentage." + + " If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls.") private String failureRatio; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether timeout is enabled or not on the circuit breaker.") private String timeoutEnabled; @XmlAttribute - @Metadata(defaultValue = "1000", javaType = "java.time.Duration") + @Metadata(defaultValue = "1000", javaType = "java.time.Duration", + description = "Configures the thread execution timeout. Default value is 1 second.") private String timeoutDuration; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "10", javaType = "java.lang.Integer") + @Metadata(label = "advanced", defaultValue = "10", javaType = "java.lang.Integer", + description = "Configures the pool size of the thread pool when timeout is enabled.") private String timeoutPoolSize; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether bulkhead is enabled or not on the circuit breaker.") private String bulkheadEnabled; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "10", javaType = "java.lang.Integer") + @Metadata(label = "advanced", defaultValue = "10", javaType = "java.lang.Integer", + description = "Configures the max amount of concurrent calls the bulkhead will support.") private String bulkheadMaxConcurrentCalls; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "10", javaType = "java.lang.Integer") + @Metadata(label = "advanced", defaultValue = "10", javaType = "java.lang.Integer", + description = "Configures the task queue size for holding waiting tasks to be processed by the bulkhead.") private String bulkheadWaitingTaskQueue; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService") + @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService", + description = "References a custom thread pool to use when offloading a guarded action to another thread.") private String threadOffloadExecutorService; public FaultToleranceConfigurationCommon() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java index 8ee79e531364..d0484f6ef522 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java @@ -31,73 +31,105 @@ import org.apache.camel.spi.Metadata; public class Resilience4jConfigurationCommon extends IdentifiedType { @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Refers to an existing io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use from the registry." + + " When using this, then any other circuit breaker options are not in use.") private String circuitBreaker; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Refers to an existing io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup and use from the registry.") private String config; @XmlAttribute - @Metadata(defaultValue = "50", javaType = "java.lang.Float") + @Metadata(defaultValue = "50", javaType = "java.lang.Float", + description = "Configures the failure rate threshold in percentage." + + " If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls.") private String failureRateThreshold; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "10", javaType = "java.lang.Integer") + @Metadata(label = "advanced", defaultValue = "10", javaType = "java.lang.Integer", + description = "Configures the number of permitted calls when the CircuitBreaker is half open.") private String permittedNumberOfCallsInHalfOpenState; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether to throw io.github.resilience4j.circuitbreaker.CallNotPermittedException when the call is rejected due" + + " circuit breaker is half open or open.") private String throwExceptionWhenHalfOpenOrOpenState; @XmlAttribute - @Metadata(defaultValue = "100", javaType = "java.lang.Integer") + @Metadata(defaultValue = "100", javaType = "java.lang.Integer", + description = "Configures the size of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed." + + " Sliding window can either be count-based or time-based.") private String slidingWindowSize; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "COUNT_BASED", enums = "TIME_BASED,COUNT_BASED") + @Metadata(label = "advanced", defaultValue = "COUNT_BASED", enums = "TIME_BASED,COUNT_BASED", + description = "Configures the type of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed." + + " Sliding window can either be count-based or time-based.") private String slidingWindowType; @XmlAttribute - @Metadata(defaultValue = "100", javaType = "java.lang.Integer") + @Metadata(defaultValue = "100", javaType = "java.lang.Integer", + description = "Configures the minimum number of calls which are required (per sliding window period) before the CircuitBreaker can calculate the error rate.") private String minimumNumberOfCalls; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Enables writable stack traces. When set to false, Exception.getStackTrace returns a zero length array." + + " This may be used to reduce log spam when the circuit breaker is open.") private String writableStackTraceEnabled; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "60", javaType = "java.lang.Integer") + @Metadata(label = "advanced", defaultValue = "60", javaType = "java.lang.Integer", + description = "Configures the wait duration (in seconds) which specifies how long the CircuitBreaker should stay open, before it switches to half open.") private String waitDurationInOpenState; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "false", javaType = "java.lang.Boolean", + description = "Enables automatic transition from OPEN to HALF_OPEN state once the waitDurationInOpenState has passed.") private String automaticTransitionFromOpenToHalfOpenEnabled; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "100", javaType = "java.lang.Float") + @Metadata(label = "advanced", defaultValue = "100", javaType = "java.lang.Float", + description = "Configures a threshold in percentage. The CircuitBreaker considers a call as slow when the call duration is greater than slowCallDurationThreshold." + + " When the percentage of slow calls is equal or greater the threshold, the CircuitBreaker transitions to open and starts short-circuiting calls.") private String slowCallRateThreshold; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "60", javaType = "java.lang.Integer") + @Metadata(label = "advanced", defaultValue = "60", javaType = "java.lang.Integer", + description = "Configures the duration threshold (seconds) above which calls are considered as slow and increase the slow calls percentage.") private String slowCallDurationThreshold; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether bulkhead is enabled or not on the circuit breaker.") private String bulkheadEnabled; @XmlAttribute - @Metadata(defaultValue = "25", javaType = "java.lang.Integer") + @Metadata(defaultValue = "25", javaType = "java.lang.Integer", + description = "Configures the max amount of concurrent calls the bulkhead will support.") private String bulkheadMaxConcurrentCalls; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "0", javaType = "java.lang.Integer") + @Metadata(label = "advanced", defaultValue = "0", javaType = "java.lang.Integer", + description = "Configures a maximum amount of time which the calling thread will wait to enter the bulkhead.") private String bulkheadMaxWaitDuration; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether timeout is enabled or not on the circuit breaker.") private String timeoutEnabled; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService") + @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService", + description = "References to a custom thread pool to use when timeout is enabled (uses ForkJoinPool.commonPool() by default).") private String timeoutExecutorService; @XmlAttribute - @Metadata(defaultValue = "1000", javaType = "java.lang.Integer") + @Metadata(defaultValue = "1000", javaType = "java.lang.Integer", + description = "Configures the thread execution timeout. Default value is 1 second.") private String timeoutDuration; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Configures whether cancel is called on the running future. Defaults to true.") private String timeoutCancelRunningFuture; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether to enable collecting statistics using Micrometer. This requires adding camel-resilience4j-micrometer JAR to the classpath.") private String micrometerEnabled; @XmlElement(name = "recordException") - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Configure a list of exceptions that are recorded as a failure and thus increase the failure rate." + + " Any exception matching or inheriting from one of the list counts as a failure, unless explicitly ignored via ignoreExceptions.") private List<String> recordExceptions = new ArrayList<>(); @XmlElement(name = "ignoreException") - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Configure a list of exceptions that are ignored and neither count as a failure nor success." + + " Any exception matching or inheriting from one of the list will not count as a failure nor success, even if the exception is part of recordExceptions.") private List<String> ignoreExceptions = new ArrayList<>(); public Resilience4jConfigurationCommon() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ASN1DataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ASN1DataFormat.java index 9f81a5d9313c..9bb6bab256c5 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ASN1DataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ASN1DataFormat.java @@ -40,7 +40,9 @@ public class ASN1DataFormat extends DataFormatDefinition { @XmlAttribute(name = "unmarshalType") private String unmarshalTypeName; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "If the asn1 file has more than one entry, the setting this option to true allows working with the splitter EIP" + + " to split each entry individually.") private String usingIterator; public ASN1DataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/AvroDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/AvroDataFormat.java index 043961dcc617..cea2337cfda2 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/AvroDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/AvroDataFormat.java @@ -46,13 +46,14 @@ public class AvroDataFormat extends DataFormatDefinition { @XmlAttribute private String instanceClassName; @XmlAttribute - @Metadata(defaultValue = "avroJackson") + @Metadata(defaultValue = "avroJackson", description = "Which Avro library to use.") private AvroLibrary library = AvroLibrary.Jackson; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Lookup and use the existing ObjectMapper with the given id when using Jackson.") private String objectMapper; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether to lookup and use default Jackson ObjectMapper from the registry.") private String useDefaultObjectMapper; @XmlAttribute(name = "unmarshalType") private String unmarshalTypeName; @@ -61,32 +62,38 @@ public class AvroDataFormat extends DataFormatDefinition { @XmlAttribute private String include; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.") private String allowJmsType; @XmlAttribute(name = "collectionType") - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Refers to a custom collection type to lookup in the registry to use.") private String collectionTypeName; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "To unmarshal to a List of Map or a List of Pojo.") private String useList; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma.") private String moduleClassNames; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma.") private String moduleRefs; @XmlAttribute private String enableFeatures; @XmlAttribute private String disableFeatures; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.") private String allowUnmarshallType; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "If set then Jackson will use the Timezone when marshalling/unmarshalling.") private String timezone; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If set to true then Jackson will lookup for an objectMapper into the registry.") private String autoDiscoverObjectMapper; @XmlAttribute @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", @@ -94,10 +101,11 @@ public class AvroDataFormat extends DataFormatDefinition { + " For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSON") private String contentTypeHeader; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Optional schema resolver used to lookup schemas for the data in transit.") private String schemaResolver; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "When not disabled, the SchemaResolver will be looked up into the registry.") private String autoDiscoverSchemaResolver; public AvroDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BarcodeDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BarcodeDataFormat.java index e05fa2672e01..861adeae0caa 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BarcodeDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BarcodeDataFormat.java @@ -36,16 +36,20 @@ public class BarcodeDataFormat extends DataFormatDefinition { @XmlAttribute @Metadata(enums = "AZTEC,CODABAR,CODE_39,CODE_93,CODE_128,DATA_MATRIX,EAN_8,EAN_13,ITF,MAXICODE,PDF_417,QR_CODE,RSS_14,RSS_EXPANDED,UPC_A,UPC_E,UPC_EAN_EXTENSION", - defaultValue = "QR_CODE") + defaultValue = "QR_CODE", + description = "Barcode format such as QR-Code.") private String barcodeFormat; @XmlAttribute - @Metadata(enums = "JPG,GIF,PNG", defaultValue = "PNG") + @Metadata(enums = "JPG,GIF,PNG", defaultValue = "PNG", + description = "Image type of the barcode such as png.") private String imageType; @XmlAttribute - @Metadata(javaType = "java.lang.Integer", defaultValue = "100") + @Metadata(javaType = "java.lang.Integer", defaultValue = "100", + description = "Width of the barcode.") private String width; @XmlAttribute - @Metadata(javaType = "java.lang.Integer", defaultValue = "100") + @Metadata(javaType = "java.lang.Integer", defaultValue = "100", + description = "Height of the barcode.") private String height; public BarcodeDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Base64DataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Base64DataFormat.java index b7cc85729679..2317b33b11e8 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Base64DataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Base64DataFormat.java @@ -35,13 +35,16 @@ import org.apache.camel.spi.Metadata; public class Base64DataFormat extends DataFormatDefinition { @XmlAttribute - @Metadata(defaultValue = "76", javaType = "java.lang.Integer") + @Metadata(defaultValue = "76", javaType = "java.lang.Integer", + description = "To specific a maximum line length for the encoded data. By default 76 is used.") private String lineLength; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "The line separators to use. By default \\r\\n is used.") private String lineSeparator; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Instead of emitting + and / we emit - and _ respectively. urlSafe is only applied to encode operations. Decoding seamlessly handles both modes.") private String urlSafe; public Base64DataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java index d113ba00429a..4b278ac8c2a8 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java @@ -39,22 +39,25 @@ public class BeanioDataFormat extends DataFormatDefinition { @XmlAttribute(required = true) private String streamName; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Whether to ignore unidentified records.") private String ignoreUnidentifiedRecords; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Whether to ignore unexpected records.") private String ignoreUnexpectedRecords; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Whether to ignore invalid records.") private String ignoreInvalidRecords; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "The charset to use. Is by default the JVM platform default charset.") private String encoding; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To use a custom org.apache.camel.dataformat.beanio.BeanIOErrorHandler as error handler while parsing." + + " Configure the fully qualified class name of the error handler.") private String beanReaderErrorHandlerType; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "This option controls whether to unmarshal as a list of objects or as a single object only.") private String unmarshalSingleObject; public BeanioDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BindyDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BindyDataFormat.java index 443501733e18..b62e9302a24c 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BindyDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BindyDataFormat.java @@ -40,21 +40,26 @@ public class BindyDataFormat extends DataFormatDefinition { private Class<?> classType; @XmlAttribute(required = true) - @Metadata(required = true, javaType = "org.apache.camel.model.dataformat.BindyType", enums = "Csv,Fixed,KeyValue") + @Metadata(required = true, javaType = "org.apache.camel.model.dataformat.BindyType", enums = "Csv,Fixed,KeyValue", + description = "Whether to use Csv, Fixed, or KeyValue.") private String type; @XmlAttribute(name = "classType") private String classTypeAsString; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "To change the default value for string types to be null instead of an empty string.") private String defaultValueStringAsNull; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "false", + description = "Whether to allow empty streams in the unmarshal process. If true, no exception will be thrown when a body without records is provided.") private String allowEmptyStream; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "When unmarshalling should a single instance be unwrapped and returned instead of wrapped in a java.util.List.") private String unwrapSingleInstance; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To configure a default locale to use, such as us for united states. To use the JVM platform default locale then use the name default.") private String locale; public BindyDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CBORDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CBORDataFormat.java index 575ed2dcdc71..c03d6253af5d 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CBORDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CBORDataFormat.java @@ -40,27 +40,33 @@ public class CBORDataFormat extends DataFormatDefinition { private Class<?> unmarshalType; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Lookup and use the existing CBOR ObjectMapper with the given id when using Jackson.") private String objectMapper; @XmlAttribute - @Metadata(defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to lookup and use default Jackson CBOR ObjectMapper from the registry.") private String useDefaultObjectMapper; @XmlAttribute(name = "unmarshalType") private String unmarshalTypeName; @XmlAttribute(name = "collectionType") - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Refers to a custom collection type to lookup in the registry to use.") private String collectionTypeName; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "To unmarshal to a List of Map or a List of Pojo.") private String useList; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header during the unmarshalling.") private String allowUnmarshallType; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "To enable pretty printing output nicely formatted. Is by default false.") private String prettyPrint; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "false", javaType = "java.lang.Boolean", + description = "Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.") private String allowJmsType; @XmlAttribute private String enableFeatures; diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CryptoDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CryptoDataFormat.java index 09bc96c53687..d25a08fb8660 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CryptoDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CryptoDataFormat.java @@ -37,28 +37,33 @@ public class CryptoDataFormat extends DataFormatDefinition { @XmlAttribute private String algorithm; @XmlAttribute - @Metadata(javaType = "java.security.Key") + @Metadata(javaType = "java.security.Key", description = "Refers to the secret key to lookup from the register to use.") private String key; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "The name of the JCE Security Provider that should be used.") private String cryptoProvider; @XmlAttribute - @Metadata(label = "advanced", javaType = "byte[]") + @Metadata(label = "advanced", javaType = "byte[]", + description = "Refers to a byte array containing the Initialization Vector that will be used to initialize the Cipher.") private String initVector; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.security.spec.AlgorithmParameterSpec") + @Metadata(label = "advanced", javaType = "java.security.spec.AlgorithmParameterSpec", + description = "A JCE AlgorithmParameterSpec used to initialize the Cipher.") private String algorithmParameterSpec; @XmlAttribute - @Metadata(javaType = "java.lang.Integer", defaultValue = "4096") + @Metadata(javaType = "java.lang.Integer", defaultValue = "4096", + description = "The size of the buffer used in the signature process.") private String bufferSize; @XmlAttribute - @Metadata(defaultValue = "HmacSHA1") + @Metadata(defaultValue = "HmacSHA1", description = "The JCE algorithm name indicating the Message Authentication algorithm.") private String macAlgorithm = "HmacSHA1"; @XmlAttribute - @Metadata(defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "true", javaType = "java.lang.Boolean", + description = "Flag indicating that a Message Authentication Code should be calculated and appended to the encrypted data.") private String shouldAppendHMAC; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "false", javaType = "java.lang.Boolean", + description = "Flag indicating that the configured IV should be inlined into the encrypted data stream. Is by default false.") private String inline; public CryptoDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java index 269ca076269f..7f00d561f831 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java @@ -37,44 +37,48 @@ public class CsvDataFormat extends DataFormatDefinition { // Format options @XmlAttribute @Metadata(enums = "DEFAULT,EXCEL,INFORMIX_UNLOAD,INFORMIX_UNLOAD_CSV,MONGODB_CSV,MONGODB_TSV,MYSQL,ORACLE,POSTGRESQL_CSV,POSTGRESQL_TEXT,RFC4180", - defaultValue = "DEFAULT") + defaultValue = "DEFAULT", + description = "The format to use.") private String format; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Disables the comment marker of the reference format.") private String commentMarkerDisabled; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Sets the comment marker of the reference format.") private String commentMarker; @XmlAttribute private String delimiter; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Use for disabling using escape character.") private String escapeDisabled; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Sets the escape character to use.") private String escape; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Use for disabling headers.") private String headerDisabled; @XmlAttribute private String header; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Whether to allow missing column names.") private String allowMissingColumnNames; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Whether to ignore empty lines.") private String ignoreEmptyLines; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Whether to ignore surrounding spaces.") private String ignoreSurroundingSpaces; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Used to disable null strings.") private String nullStringDisabled; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Sets the null string.") private String nullString; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Used to disable quotes.") private String quoteDisabled; @XmlAttribute private String quote; @@ -83,39 +87,49 @@ public class CsvDataFormat extends DataFormatDefinition { @XmlAttribute private String recordSeparator; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Whether to skip the header record in the output.") private String skipHeaderRecord; @XmlAttribute - @Metadata(enums = "ALL,ALL_NON_NULL,MINIMAL,NON_NUMERIC,NONE") + @Metadata(enums = "ALL,ALL_NON_NULL,MINIMAL,NON_NUMERIC,NONE", + description = "Sets the quote mode.") private String quoteMode; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether to ignore case when accessing header names.") private String ignoreHeaderCase; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether to trim leading and trailing blanks.") private String trim; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether to add a trailing delimiter.") private String trailingDelimiter; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Sets the implementation of the CsvMarshallerFactory interface which is able to customize marshalling/unmarshalling behavior.") private String marshallerFactoryRef; // Unmarshall options @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one.") private String lazyLoad; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether the unmarshalling should produce maps (HashMap) for the lines values instead of lists. It requires to have header (either defined or collected).") private String useMaps; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether the unmarshalling should produce ordered maps (LinkedHashMap) for the lines values instead of lists. It requires to have header (either defined or collected).") private String useOrderedMaps; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Refers to a custom CsvRecordConverter to lookup from the registry to use.") private String recordConverterRef; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether the unmarshalling should capture the header record and store it in the message header.") private String captureHeaderRecord; public CsvDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FhirDataformat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FhirDataformat.java index d1825c983334..4bed246660cd 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FhirDataformat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FhirDataformat.java @@ -29,55 +29,76 @@ import org.apache.camel.spi.Metadata; public abstract class FhirDataformat extends DataFormatDefinition implements ContentTypeHeaderAware { @XmlAttribute - @Metadata(enums = "DSTU2,DSTU2_HL7ORG,DSTU2_1,DSTU3,R4,R5", defaultValue = "R4") + @Metadata(enums = "DSTU2,DSTU2_HL7ORG,DSTU2_1,DSTU3,R4,R5", defaultValue = "R4", + description = "The version of FHIR to use. Possible values are: DSTU2, DSTU2_HL7ORG, DSTU2_1, DSTU3, R4, R5.") private String fhirVersion; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "To use a custom fhir context. Reference to object of type ca.uhn.fhir.context.FhirContext.") private String fhirContext; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Sets the pretty print flag, meaning that the parser will encode resources with human-readable spacing and newlines between elements.") private String prettyPrint; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Registers an error handler which will be invoked when any parse errors are found. Reference to object of type ca.uhn.fhir.parser.IParserErrorHandler.") private String parserErrorHandler; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Sets the parser options object which will be used to supply default options to newly created parsers." + + " Reference to object of type ca.uhn.fhir.context.ParserOptions.") private String parserOptions; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "If set (FQN class names), when parsing resources the parser will try to use the given types when possible." + + " Multiple class names can be separated by comma.") private String preferTypes; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "When encoding, force this resource ID to be encoded as the resource ID. Reference to object of type org.hl7.fhir.instance.model.api.IIdType.") private String forceResourceId; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Sets the server's base URL used by this parser. If a value is set, resource references will be turned into relative references" + + " if they are provided as absolute URLs but have a base matching the given base.") private String serverBaseUrl; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If set to true (default is false) the ID of any resources being encoded will not be included in the output.") private String omitResourceId; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If set to true (default is false), the values supplied to setEncodeElements will not be applied to the root resource (typically a Bundle)," + + " but will be applied to any sub-resources contained within it.") private String encodeElementsAppliesToChildResourcesOnly; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "If provided, specifies the elements which should be encoded, to the exclusion of all others. Multiple elements can be separated by comma.") private String encodeElements; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "If provided, specifies the elements which should NOT be encoded. Multiple elements can be separated by comma.") private String dontEncodeElements; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If set to true (which is the default), resource references containing a version will have the version removed when the resource is encoded.") private String stripVersionsFromReferences; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If set to true (which is the default), the Bundle.entry.fullUrl will override the Bundle.entry.resource's resource id if the fullUrl is defined.") private String overrideResourceIdWithBundleEntryFullUrl; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If set to true (default is false) only elements marked by the FHIR specification as being summary elements will be included.") private String summaryMode; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If set to true (default is false), narratives will not be included in the encoded values.") private String suppressNarratives; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "If supplied value(s), any resource references at the specified paths will have their resource versions encoded" + + " instead of being automatically stripped during the encoding process. Multiple elements can be separated by comma.") private String dontStripVersionsFromReferencesAtPaths; @XmlAttribute @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FlatpackDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FlatpackDataFormat.java index 279192374618..8db3f8a9d1b8 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FlatpackDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FlatpackDataFormat.java @@ -38,25 +38,30 @@ public class FlatpackDataFormat extends DataFormatDefinition { @XmlAttribute private String definition; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Delimited or fixed. Is by default false = delimited.") private String fixed; @XmlAttribute - @Metadata(defaultValue = ",") + @Metadata(defaultValue = ",", description = "The delimiter char (could be ; , or similar).") private String delimiter; @XmlAttribute - @Metadata(defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether the first line is ignored for delimited files (for the column headers). Is by default true.") private String ignoreFirstRecord; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Allows for lines to be shorter than expected and ignores the extra characters.") private String allowShortLines; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Allows for lines to be longer than expected and ignores the extra characters.") private String ignoreExtraColumns; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "If the text is qualified with a character. Uses quote character by default.") private String textQualifier; @XmlAttribute - @Metadata(label = "advanced", javaType = "net.sf.flatpack.ParserFactory") + @Metadata(label = "advanced", javaType = "net.sf.flatpack.ParserFactory", + description = "References to a custom parser factory to lookup in the registry.") private String parserFactory; public FlatpackDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java index 5909248d6e06..8cb376a116c7 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java @@ -37,53 +37,67 @@ public class JaxbDataFormat extends DataFormatDefinition implements ContentTypeH @XmlAttribute(required = true) private String contextPath; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "This can be set to true to mark that the contextPath is referring to a classname and not a package name.") private String contextPathIsClassName; @XmlAttribute private String schema; @XmlAttribute - @Metadata(javaType = "java.lang.Integer", enums = "0,1,2", defaultValue = "0") + @Metadata(javaType = "java.lang.Integer", enums = "0,1,2", defaultValue = "0", + description = "Sets the schema severity level to use when validating against a schema." + + " The default value of 0 (warning) means that any error will trigger JAXB to stop. There are the following three levels: 0=warning, 1=error, 2=fatal error.") private String schemaSeverityLevel; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", + description = "To enable pretty printing output nicely formatted. Is by default false.") private String prettyPrint; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether to allow using ObjectFactory classes to create the POJO classes during marshalling.") private String objectFactory; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether to ignore JAXBElement elements - only needed to be set to false in very special use-cases.") private String ignoreJAXBElement; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether marshalling must be java objects with JAXB annotations. And if not then it fails." + + " This option can be set to false to relax that, such as when the data is already in XML format.") private String mustBeJAXBElement; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "To ignore non xml characters and replace them with an empty space.") private String filterNonXmlChars; @XmlAttribute private String encoding; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "To turn on marshalling XML fragment trees. This is useful when generated code does not have @XmlRootElement annotation" + + " and you need to unmarshall only part of the tree.") private String fragment; // Partial encoding @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Name of class used for fragment parsing.") private String partClass; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "XML namespace to use for fragment parsing.") private String partNamespace; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.Map") + @Metadata(label = "advanced", javaType = "java.util.Map", + description = "When marshalling using JAXB or SOAP then the JAXB implementation will automatically assign namespace prefixes," + + " such as ns2, ns3, ns4 etc. To control this mapping, Camel allows you to refer to a map which contains the desired mapping.") private String namespacePrefix; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "To use a custom xml stream writer.") private String xmlStreamWriterWrapper; @XmlAttribute private String schemaLocation; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "To define the location of the namespaceless schema.") private String noNamespaceSchemaLocation; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Refers to a custom java.util.Map to lookup in the registry containing custom JAXB provider properties to be used with the JAXB marshaller.") private String jaxbProviderProperties; @XmlAttribute @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", @@ -91,7 +105,9 @@ public class JaxbDataFormat extends DataFormatDefinition implements ContentTypeH + " For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSON") private String contentTypeHeader; @XmlAttribute - @Metadata(label = "security") + @Metadata(label = "security", + description = "Only in use if schema validation has been enabled." + + " Restrict access to the protocols specified for external reference set by the schemaLocation attribute, Import and Include element.") private String accessExternalSchemaProtocols; public JaxbDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java index 12f484f2db2c..ebe8228af39c 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java @@ -37,16 +37,19 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH @XmlAttribute private String objectMapper; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether to lookup and use default Jackson ObjectMapper from the registry.") private String useDefaultObjectMapper; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "false", + description = "If set to true then Jackson will look for an objectMapper to use from the registry.") private String autoDiscoverObjectMapper; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "To enable pretty printing output nicely formatted. Is by default false.") private String prettyPrint; @XmlAttribute - @Metadata(defaultValue = "Jackson") + @Metadata(defaultValue = "Jackson", description = "Which json library to use.") private JsonLibrary library = JsonLibrary.Jackson; @XmlAttribute @Metadata(javaType = "java.lang.Boolean", @@ -58,47 +61,65 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH @XmlTransient private Class<?> unmarshalType; @XmlAttribute(name = "jsonView") - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output." + + " With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has @JsonView annotations.") private String jsonViewTypeName; @XmlTransient private Class<?> jsonView; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "If you want to marshal a POJO to JSON, and the POJO has some fields with null values." + + " And you want to skip these null values, you can set this option to NON_NULL.") private String include; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.") private String allowJmsType; @XmlAttribute(name = "collectionType") - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Refers to a custom collection type to lookup in the registry to use." + + " This option should rarely be used, but allows using different collection types than java.util.Collection based as default.") private String collectionTypeName; @XmlTransient private Class<?> collectionType; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "To unmarshal to a List of Map or a List of Pojo.") private String useList; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names." + + " Multiple classes can be separated by comma.") private String moduleClassNames; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma.") private String moduleRefs; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. Multiple features can be separated by comma.") private String enableFeatures; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. Multiple features can be separated by comma.") private String disableFeatures; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling." + + " This should only be enabled when desired to be used.") private String allowUnmarshallType; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "If set then Jackson will use the Timezone when marshalling/unmarshalling.") private String timezone; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.component.jackson.SchemaResolver") + @Metadata(label = "advanced", javaType = "org.apache.camel.component.jackson.SchemaResolver", + description = "Optional schema resolver used to lookup schemas for the data in transit.") private String schemaResolver; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "When not disabled, the SchemaResolver will be looked up into the registry.") private String autoDiscoverSchemaResolver; @XmlAttribute @Metadata(description = "If set then Jackson will use the the defined Property Naming Strategy." @@ -113,7 +134,8 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH @Metadata(description = "To configure the date format while marshall or unmarshall Date fields in JSON using Gson") private String dateFormatPattern; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Integer") + @Metadata(label = "advanced", javaType = "java.lang.Integer", + description = "Sets the maximum string length (in chars or bytes, depending on input context). The default is 20,000,000.") private String maxStringLength; public JsonDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java index f1d9ad3a5e1c..efcd4e0a9681 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java @@ -50,21 +50,29 @@ public class PGPDataFormat extends DataFormatDefinition { @XmlAttribute private String signatureKeyRing; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "This option will cause PGP to base64 encode the encrypted text, making it available for copy/paste, etc.") private String armored; @XmlAttribute - @Metadata(defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "true", javaType = "java.lang.Boolean", + description = "Adds an integrity check/sign into the encryption file.") private String integrity; @XmlAttribute private String provider; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", + description = "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags." + + " Only relevant for encrypting.") private String algorithm; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", + description = "Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags." + + " Only relevant for encrypting.") private String compressionAlgorithm; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", + description = "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags." + + " Only relevant for signing.") private String hashAlgorithm; @XmlAttribute private String signatureVerificationOption; diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java index f325977e1f26..d47eed275a5e 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java @@ -40,16 +40,18 @@ public class ProtobufDataFormat extends DataFormatDefinition implements ContentT @XmlAttribute private String instanceClass; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Lookup and use the existing ObjectMapper with the given id when using Jackson.") private String objectMapper; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether to lookup and use default Jackson ObjectMapper from the registry.") private String useDefaultObjectMapper; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "false", + description = "If set to true then Jackson will lookup for an objectMapper into the registry.") private String autoDiscoverObjectMapper; @XmlAttribute - @Metadata(defaultValue = "GoogleProtobuf") + @Metadata(defaultValue = "GoogleProtobuf", description = "Which Protobuf library to use.") private ProtobufLibrary library = ProtobufLibrary.GoogleProtobuf; @XmlAttribute(name = "unmarshalType") private String unmarshalTypeName; @@ -62,39 +64,46 @@ public class ProtobufDataFormat extends DataFormatDefinition implements ContentT @XmlAttribute private String include; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.") private String allowJmsType; @XmlAttribute(name = "collectionType") private String collectionTypeName; @XmlTransient private Class<?> collectionType; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "To unmarshal to a List of Map or a List of Pojo.") private String useList; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma.") private String moduleClassNames; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma.") private String moduleRefs; @XmlAttribute private String enableFeatures; @XmlAttribute private String disableFeatures; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.") private String allowUnmarshallType; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "If set then Jackson will use the Timezone when marshalling/unmarshalling.") private String timezone; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Optional schema resolver used to lookup schemas for the data in transit.") private String schemaResolver; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "When not disabled, the SchemaResolver will be looked up into the registry.") private String autoDiscoverSchemaResolver; @XmlAttribute - @Metadata(enums = "native,json", defaultValue = "native") + @Metadata(enums = "native,json", defaultValue = "native", + description = "Defines a content type format in which protobuf message will be serialized/deserialized from(to) the Java been." + + " The format can either be native or json for either native protobuf or json fields representation.") private String contentTypeFormat; @XmlAttribute @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SoapDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SoapDataFormat.java index 8c87ad161c75..8bbb476b4ab1 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SoapDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SoapDataFormat.java @@ -42,18 +42,23 @@ public class SoapDataFormat extends DataFormatDefinition { @XmlAttribute private String encoding; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.dataformat.soap.name.ElementNameStrategy") + @Metadata(label = "advanced", javaType = "org.apache.camel.dataformat.soap.name.ElementNameStrategy", + description = "Refers to an element strategy to lookup from the registry.") private String elementNameStrategy; @XmlAttribute - @Metadata(defaultValue = "1.1", enums = "1.1,1.2") + @Metadata(defaultValue = "1.1", enums = "1.1,1.2", + description = "SOAP version should either be 1.1 or 1.2. Is by default 1.1.") private String version; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.Map") + @Metadata(label = "advanced", javaType = "java.util.Map", + description = "When marshalling using JAXB or SOAP then the JAXB implementation will automatic assign namespace prefixes." + + " To control this mapping, Camel allows you to refer to a map which contains the desired mapping.") private String namespacePrefix; @XmlAttribute private String schema; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether to ignore headers that were not unmarshalled.") private String ignoreUnmarshalledHeaders; public SoapDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/UniVocityAbstractDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/UniVocityAbstractDataFormat.java index ca5cdbb703b1..83e8d201267a 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/UniVocityAbstractDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/UniVocityAbstractDataFormat.java @@ -36,45 +36,55 @@ import org.apache.camel.spi.Metadata; public abstract class UniVocityAbstractDataFormat extends DataFormatDefinition { @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "The string representation of a null value.") protected String nullValue; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether or not the empty lines must be ignored.") protected String skipEmptyLines; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether or not the trailing white spaces must be ignored.") protected String ignoreTrailingWhitespaces; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether or not the leading white spaces must be ignored.") protected String ignoreLeadingWhitespaces; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether or not the headers are disabled. When defined, this option explicitly sets the headers as null which indicates that there is no header.") protected String headersDisabled; @XmlElementRef protected List<UniVocityHeader> headers; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether or not the header must be read in the first line of the test document.") protected String headerExtractionEnabled; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Integer") + @Metadata(label = "advanced", javaType = "java.lang.Integer", + description = "The maximum number of record to read.") protected String numberOfRecordsToRead; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "The String representation of an empty value.") protected String emptyValue; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "The line separator of the files. The default value is to use the JVM platform line separator.") protected String lineSeparator; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "The normalized line separator of the files. The default value is a new line character.") protected String normalizedLineSeparator; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "#") + @Metadata(label = "advanced", defaultValue = "#", description = "The comment symbol.") protected String comment; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at once.") protected String lazyLoad; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether the unmarshalling should produce maps for the lines values instead of lists. It requires to have header (either defined or collected).") protected String asMap; protected UniVocityAbstractDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/UniVocityCsvDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/UniVocityCsvDataFormat.java index ad841b829c30..46e91b46a292 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/UniVocityCsvDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/UniVocityCsvDataFormat.java @@ -33,16 +33,17 @@ import org.apache.camel.spi.Metadata; public class UniVocityCsvDataFormat extends UniVocityAbstractDataFormat { @XmlAttribute - @Metadata(defaultValue = ",") + @Metadata(defaultValue = ",", description = "The delimiter of values.") private String delimiter; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether or not all values must be quoted when writing them.") private String quoteAllFields; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "\"") + @Metadata(label = "advanced", defaultValue = "\"", description = "The quote symbol.") private String quote; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "\"") + @Metadata(label = "advanced", defaultValue = "\"", description = "The quote escape symbol.") private String quoteEscape; public UniVocityCsvDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java index b2a8969b76f2..b99f77624997 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java @@ -47,40 +47,52 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names @XmlAttribute @Metadata(defaultValue = "AES-256-GCM", - enums = "TRIPLEDES,AES_128,AES_128_GCM,AES_192,AES_192_GCM,AES_256,AES_256_GCM,SEED_128,CAMELLIA_128,CAMELLIA_192,CAMELLIA_256") + enums = "TRIPLEDES,AES_128,AES_128_GCM,AES_192,AES_192_GCM,AES_256,AES_256_GCM,SEED_128,CAMELLIA_128,CAMELLIA_192,CAMELLIA_256", + description = "The cipher algorithm to be used for encryption/decryption of the XML message content.") private String xmlCipherAlgorithm; @XmlAttribute - @Metadata(security = "secret") + @Metadata(security = "secret", + description = "A String used as passPhrase to encrypt/decrypt content.") private String passPhrase; @XmlAttribute - @Metadata(label = "advanced", security = "secret") + @Metadata(label = "advanced", security = "secret", + description = "A byte[] used as passPhrase to encrypt/decrypt content.") private byte[] passPhraseByte; @XmlAttribute private String secureTag; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element." + + " false = Element Level, true = Element Content Level.") private String secureTagContents; @XmlAttribute - @Metadata(defaultValue = "RSA_OAEP", enums = "RSA_v1dot5,RSA_OAEP,RSA_OAEP_11") + @Metadata(defaultValue = "RSA_OAEP", enums = "RSA_v1dot5,RSA_OAEP,RSA_OAEP_11", + description = "The cipher algorithm to be used for encryption/decryption of the asymmetric key.") private String keyCipherAlgorithm; @XmlAttribute private String recipientKeyAlias; @XmlAttribute - @Metadata(javaType = "org.apache.camel.support.jsse.KeyStoreParameters") + @Metadata(javaType = "org.apache.camel.support.jsse.KeyStoreParameters", + description = "Refers to a KeyStore instance to lookup in the registry, which is used for configuration options for creating and" + + " loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore.") private String keyOrTrustStoreParameters; @XmlAttribute private String keyPassword; @XmlAttribute - @Metadata(defaultValue = "SHA1", enums = "SHA1,SHA256,SHA512") + @Metadata(defaultValue = "SHA1", enums = "SHA1,SHA256,SHA512", + description = "The digest algorithm to use with the RSA OAEP algorithm.") private String digestAlgorithm; @XmlAttribute - @Metadata(defaultValue = "MGF1_SHA1", enums = "MGF1_SHA1,MGF1_SHA256,MGF1_SHA512") + @Metadata(defaultValue = "MGF1_SHA1", enums = "MGF1_SHA1,MGF1_SHA256,MGF1_SHA512", + description = "The MGF Algorithm to use with the RSA OAEP algorithm.") private String mgfAlgorithm; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.") private String addKeyValueForEncryptedKey; @XmlAttribute(name = "namespace") - @Metadata(javaType = "java.util.Map") + @Metadata(javaType = "java.util.Map", + description = "Refers to a Map of XML Namespaces of prefix to uri mappings.") private String namespaceRef; public XMLSecurityDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/YAMLDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/YAMLDataFormat.java index d95dcb206fc6..b1969393c77b 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/YAMLDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/YAMLDataFormat.java @@ -42,39 +42,44 @@ public class YAMLDataFormat extends DataFormatDefinition { private Class<?> unmarshalType; @XmlAttribute - @Metadata(defaultValue = "SnakeYAML") + @Metadata(defaultValue = "SnakeYAML", description = "Which yaml library to use. By default it is SnakeYAML.") private YAMLLibrary library; @XmlAttribute(name = "unmarshalType") private String unmarshalTypeName; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "BaseConstructor to construct incoming documents.") private String constructor; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Representer to emit outgoing objects.") private String representer; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "DumperOptions to configure outgoing objects.") private String dumperOptions; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Resolver to detect implicit type.") private String resolver; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(javaType = "java.lang.Boolean", defaultValue = "true", + description = "Use ApplicationContextClassLoader as custom ClassLoader.") private String useApplicationContextClassLoader; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Force the emitter to produce a pretty YAML document when using the flow style.") private String prettyFlow; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", description = "Allow any class to be un-marshaled.") private String allowAnyType; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Set the types SnakeYAML is allowed to un-marshall. Multiple types can be separated by comma.") private String typeFilter; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Integer", defaultValue = "50") + @Metadata(label = "advanced", javaType = "java.lang.Integer", defaultValue = "50", + description = "Set the maximum amount of aliases allowed for collections.") private String maxAliasesForCollections; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Set whether recursive keys are allowed.") private String allowRecursiveKeys; public YAMLDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ZipFileDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ZipFileDataFormat.java index 87a7c94c5f75..a2b63e10af54 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ZipFileDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ZipFileDataFormat.java @@ -35,16 +35,22 @@ import org.apache.camel.spi.Metadata; public class ZipFileDataFormat extends DataFormatDefinition { @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "If the zip file has more than one entry, the setting this option to true, allows working with the splitter EIP," + + " to split the data using an iterator in a streaming mode.") private String usingIterator; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "If the zip file has more than one entry, setting this option to true, allows to get the iterator even if the directory is empty.") private String allowEmptyDirectory; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "If the file name contains path elements, setting this option to true, allows the path to be maintained in the zip file.") private String preservePathElements; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Long", defaultValue = "1073741824") + @Metadata(label = "advanced", javaType = "java.lang.Long", defaultValue = "1073741824", + description = "Set the maximum decompressed size of a zip file (in bytes). The default value if not specified corresponds to 1 gigabyte." + + " Set to -1 to disable setting a maximum decompressed size.") private String maxDecompressedSize; public ZipFileDataFormat() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/CSimpleExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/CSimpleExpression.java index 2c8cb85d81b7..18e6a776a030 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/CSimpleExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/CSimpleExpression.java @@ -35,10 +35,12 @@ import org.apache.camel.spi.Metadata; public class CSimpleExpression extends TypedExpressionDefinition { @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether to trim the returned values when this language is in use.") private String trimResult; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "To pretty format the output (only JSon or XML supported).") private String pretty; public CSimpleExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/ExpressionDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/ExpressionDefinition.java index f01924438441..f2b04bbf055c 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/ExpressionDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/ExpressionDefinition.java @@ -64,10 +64,11 @@ public class ExpressionDefinition @XmlID private String id; @XmlValue - @Metadata(required = true) + @Metadata(required = true, description = "The expression value in your chosen language syntax.") private String expression; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to trim the source code to remove leading and trailing whitespaces and line breaks.") private String trim; public ExpressionDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/JavaExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/JavaExpression.java index 4d2942473d1e..55e6cd3d70ec 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/JavaExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/JavaExpression.java @@ -33,10 +33,12 @@ import org.apache.camel.spi.Metadata; public class JavaExpression extends TypedExpressionDefinition { @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether the expression should be pre compiled once during initialization phase. If this is turned off, then the expression is reloaded and compiled on each evaluation.") private String preCompile; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether single quotes can be used as replacement for double quotes. This is convenient when you need to work with strings inside strings.") private String singleQuotes; public JavaExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/JoorExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/JoorExpression.java index 8e1eab0fa20b..d72a0301ecad 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/JoorExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/JoorExpression.java @@ -34,10 +34,12 @@ import org.apache.camel.spi.Metadata; public class JoorExpression extends TypedExpressionDefinition { @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether the expression should be pre compiled once during initialization phase. If this is turned off, then the expression is reloaded and compiled on each evaluation.") private String preCompile; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether single quotes can be used as replacement for double quotes. This is convenient when you need to work with strings inside strings.") private String singleQuotes; public JoorExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/JsonPathExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/JsonPathExpression.java index f398318c6e53..0d12e7e822b6 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/JsonPathExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/JsonPathExpression.java @@ -37,23 +37,29 @@ import org.apache.camel.spi.Metadata; public class JsonPathExpression extends SingleInputTypedExpressionDefinition { @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether to suppress exceptions such as PathNotFoundException.") private String suppressExceptions; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to allow in inlined Simple exceptions in the JSONPath expression.") private String allowSimple; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to allow using the easy predicate parser to pre-parse predicates.") private String allowEasyPredicate; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether to write the output of each row/element as a JSON String value instead of a Map/POJO value.") private String writeAsString; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether to unpack a single element json-array into an object.") private String unpackArray; @XmlAttribute @Metadata(label = "advanced", - enums = "DEFAULT_PATH_LEAF_TO_NULL,ALWAYS_RETURN_LIST,AS_PATH_LIST,SUPPRESS_EXCEPTIONS,REQUIRE_PROPERTIES") + enums = "DEFAULT_PATH_LEAF_TO_NULL,ALWAYS_RETURN_LIST,AS_PATH_LIST,SUPPRESS_EXCEPTIONS,REQUIRE_PROPERTIES", + description = "To configure additional options on JSONPath. Multiple values can be separated by comma.") private String option; public JsonPathExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/MethodCallExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/MethodCallExpression.java index 4e19a144adc7..62ab2aa4f106 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/MethodCallExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/MethodCallExpression.java @@ -45,10 +45,12 @@ public class MethodCallExpression extends TypedExpressionDefinition { @XmlAttribute(name = "beanType") private String beanTypeName; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "Singleton", enums = "Singleton,Request,Prototype") + @Metadata(label = "advanced", defaultValue = "Singleton", enums = "Singleton,Request,Prototype", + description = "Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint.") private String scope; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to validate the bean has the configured method.") private String validate; public MethodCallExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/NamespaceAwareExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/NamespaceAwareExpression.java index 3703009515c2..eb04bf9e91c7 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/NamespaceAwareExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/NamespaceAwareExpression.java @@ -41,7 +41,7 @@ import org.apache.camel.support.builder.Namespaces; public abstract class NamespaceAwareExpression extends SingleInputTypedExpressionDefinition implements NamespaceAware { @XmlElement(name = "namespace") - @Metadata(label = "common") + @Metadata(label = "common", description = "Injects the XML Namespaces of prefix to uri mappings.") private List<PropertyDefinition> namespace; @XmlTransient private Map<String, String> namespaces; diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/SimpleExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/SimpleExpression.java index 3abcb5793198..ff87dc2cd35f 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/SimpleExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/SimpleExpression.java @@ -34,13 +34,16 @@ import org.apache.camel.spi.Metadata; public class SimpleExpression extends TypedExpressionDefinition { @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "Whether to trim the returned values when this language is in use.") private String trimResult; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", + description = "To pretty format the output (only JSon or XML supported).") private String pretty; @XmlAttribute - @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", label = "advanced") + @Metadata(defaultValue = "false", javaType = "java.lang.Boolean", label = "advanced", + description = "If the result is a nested simple expression should this expression be evaluated as well.") private String nested; public SimpleExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/TokenizerExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/TokenizerExpression.java index 32ddf973505e..38ac986d51a2 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/TokenizerExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/TokenizerExpression.java @@ -37,25 +37,32 @@ public class TokenizerExpression extends SingleInputTypedExpressionDefinition { @XmlAttribute private String endToken; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To inherit namespaces from a root/parent tag name when using XML. You can use simple language as the tag name to support dynamic names.") private String inheritNamespaceTagName; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If the token is a regular expression pattern.") private String regex; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether the input is XML messages. This option must be set to true if working with XML payloads.") private String xml; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Whether to include the tokens in the parts when using pairs. When including tokens then the endToken property must also be configured (to use pair mode).") private String includeTokens; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "To group N parts together, for example to split big files into chunks of 1000 lines. You can use simple language as the group to support dynamic group sizes.") private String group; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Sets the delimiter to use when grouping. If this has not been set then token will be used as the delimiter.") private String groupDelimiter; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "To skip the very first element.") private String skipFirst; public TokenizerExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/WasmExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/WasmExpression.java index 16f03931aba3..a114b54070f1 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/WasmExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/WasmExpression.java @@ -33,7 +33,8 @@ import org.apache.camel.spi.Metadata; public class WasmExpression extends TypedExpressionDefinition { @XmlAttribute - @Metadata(required = true) + @Metadata(required = true, + description = "Set the module (the distributable, loadable, and executable unit of code in WebAssembly) resource that provides the expression function.") private String module; public WasmExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/XMLTokenizerExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/XMLTokenizerExpression.java index a4acb72a4103..c35634a20b87 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/XMLTokenizerExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/XMLTokenizerExpression.java @@ -34,10 +34,11 @@ import org.apache.camel.spi.Metadata; public class XMLTokenizerExpression extends NamespaceAwareExpression { @XmlAttribute - @Metadata(defaultValue = "i", enums = "i,w,u,t") + @Metadata(defaultValue = "i", enums = "i,w,u,t", + description = "The extraction mode. The available extraction modes are: i - injecting the contextual namespace bindings into the extracted token (default), w - wrapping the extracted token in its ancestor context, u - unwrapping the extracted token to its child content, t - extracting the text content of the specified element.") private String mode; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", description = "To group N parts together.") private String group; public XMLTokenizerExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/XPathExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/XPathExpression.java index 33b4aeb38497..ad162db68fd8 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/XPathExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/XPathExpression.java @@ -42,28 +42,32 @@ public class XPathExpression extends NamespaceAwareExpression { private XPathFactory xpathFactory; @XmlAttribute(name = "documentType") - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "Name of class for document type. The default value is org.w3c.dom.Document.") private String documentTypeName; @XmlAttribute(name = "resultQName") - @Metadata(defaultValue = "NODESET", enums = "NUMBER,STRING,BOOLEAN,NODESET,NODE") + @Metadata(defaultValue = "NODESET", enums = "NUMBER,STRING,BOOLEAN,NODESET,NODE", + description = "Sets the output type supported by XPath.") private String resultQName; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", description = "Whether to use Saxon.") private String saxon; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "References to a custom XPathFactory to lookup in the registry.") private String factoryRef; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", description = "The XPath object model to use.") private String objectModel; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether to log namespaces which can assist during troubleshooting.") private String logNamespaces; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether to enable thread-safety for the returned result of the xpath expression. This applies to when using NODESET as the result type, and the returned set has multiple elements.") private String threadSafety; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether to enable pre-compiling the xpath expression during initialization phase. pre-compile is enabled by default.") private String preCompile; public XPathExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/XQueryExpression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/XQueryExpression.java index 456bfc19ba96..ea5d57dc86b0 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/language/XQueryExpression.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/XQueryExpression.java @@ -35,7 +35,8 @@ public class XQueryExpression extends NamespaceAwareExpression { @XmlTransient private Object configuration; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Reference to a saxon configuration instance in the registry to use for xquery (requires camel-saxon).") private String configurationRef; public XQueryExpression() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ApiKeyDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ApiKeyDefinition.java index ac3422415117..3e47663e71ee 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ApiKeyDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ApiKeyDefinition.java @@ -32,16 +32,20 @@ import org.apache.camel.spi.Metadata; public class ApiKeyDefinition extends RestSecurityDefinition { @XmlAttribute(name = "name", required = true) - @Metadata(required = true) + @Metadata(description = "The name of the header or query parameter to be used.", + required = true) private String name; @XmlAttribute(name = "inHeader") - @Metadata(javaType = "java.lang.Boolean") + @Metadata(description = "To use header as the location of the API key.", + javaType = "java.lang.Boolean") private String inHeader; @XmlAttribute(name = "inQuery") - @Metadata(javaType = "java.lang.Boolean") + @Metadata(description = "To use query parameter as the location of the API key.", + javaType = "java.lang.Boolean") private String inQuery; @XmlAttribute(name = "inCookie") - @Metadata(javaType = "java.lang.Boolean") + @Metadata(description = "To use a cookie as the location of the API key.", + javaType = "java.lang.Boolean") private String inCookie; public ApiKeyDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/OAuth2Definition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/OAuth2Definition.java index 82a4f1c5a00a..a15032075d1b 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/OAuth2Definition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/OAuth2Definition.java @@ -42,7 +42,8 @@ public class OAuth2Definition extends RestSecurityDefinition { @XmlAttribute private String refreshUrl; @XmlAttribute - @Metadata(enums = "implicit,password,application,clientCredentials,accessCode,authorizationCode") + @Metadata(description = "The flow used by the OAuth2 security scheme. Valid values are implicit, password, application or accessCode.", + enums = "implicit,password,application,clientCredentials,accessCode,authorizationCode") private String flow; @XmlElement(name = "scopes") private List<RestPropertyDefinition> scopes = new ArrayList<>(); diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/OpenApiDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/OpenApiDefinition.java index 1156597cc2ba..1f59f8e8bd81 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/OpenApiDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/OpenApiDefinition.java @@ -43,13 +43,16 @@ public class OpenApiDefinition extends OptionalIdentifiedDefinition<OpenApiDefin @XmlAttribute private String routeId; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(description = "Whether to disable all the REST services from the OpenAPI contract from the route during build time. Once an REST service has been disabled then it cannot be enabled later at runtime.", + label = "advanced", javaType = "java.lang.Boolean") private String disabled; @XmlAttribute - @Metadata(enums = "fail,ignore,mock", defaultValue = "fail") + @Metadata(description = "Whether to fail, ignore or return a mock response for OpenAPI operations that are not mapped to a corresponding route.", + enums = "fail,ignore,mock", defaultValue = "fail") private String missingOperation; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "classpath:camel-mock/**") + @Metadata(description = "Used for inclusive filtering of mock data from directories. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma.", + label = "advanced", defaultValue = "classpath:camel-mock/**") private String mockIncludePattern; public void setRest(RestDefinition rest) { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ParamDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ParamDefinition.java index fa86aeacda3f..88359a7ce384 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ParamDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ParamDefinition.java @@ -47,23 +47,28 @@ public class ParamDefinition { @XmlAttribute(required = true) private String name; @XmlAttribute(required = true) - @Metadata(defaultValue = "path") + @Metadata(description = "Sets the parameter type such as body, form, header, path, or query.", + defaultValue = "path") private RestParamType type; @XmlAttribute private String description; @XmlAttribute private String defaultValue; @XmlAttribute - @Metadata(defaultValue = "true") + @Metadata(description = "Sets the parameter required flag.", + defaultValue = "true") private Boolean required; @XmlAttribute - @Metadata(defaultValue = "csv") + @Metadata(description = "Sets the parameter collection format.", + defaultValue = "csv") private CollectionFormat collectionFormat; @XmlAttribute - @Metadata(defaultValue = "string") + @Metadata(description = "Sets the parameter array type. Required if data type is array. Describes the type of items in the array.", + defaultValue = "string") private String arrayType; @XmlAttribute - @Metadata(defaultValue = "string") + @Metadata(description = "Sets the parameter data type such as string, integer, or boolean.", + defaultValue = "string") private String dataType; @XmlAttribute private String dataFormat; diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ResponseHeaderDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ResponseHeaderDefinition.java index f9db049ec0ca..3d5a01c4b132 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ResponseHeaderDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ResponseHeaderDefinition.java @@ -49,13 +49,16 @@ public class ResponseHeaderDefinition { @XmlAttribute private String description; @XmlAttribute - @Metadata(defaultValue = "csv") + @Metadata(description = "Sets the parameter collection format.", + defaultValue = "csv") private CollectionFormat collectionFormat; @XmlAttribute - @Metadata(defaultValue = "string") + @Metadata(description = "Sets the parameter array type. Required if data type is array. Describes the type of items in the array.", + defaultValue = "string") private String arrayType; @XmlAttribute - @Metadata(defaultValue = "string") + @Metadata(description = "Sets the header data type such as string, integer, or boolean.", + defaultValue = "string") private String dataType; @XmlAttribute private String dataFormat; diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ResponseMessageDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ResponseMessageDefinition.java index d103427879d2..3c69205c0991 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ResponseMessageDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/ResponseMessageDefinition.java @@ -41,7 +41,8 @@ public class ResponseMessageDefinition { private VerbDefinition verb; @XmlAttribute - @Metadata(defaultValue = "200") + @Metadata(description = "The response code such as a HTTP status code.", + defaultValue = "200") private String code; @XmlAttribute private String contentType; 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 6eb5f400d217..61f626e4b8d5 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 @@ -58,35 +58,44 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind @XmlAttribute private String produces; @XmlAttribute - @Metadata(defaultValue = "off", enums = "off,auto,json,xml,json_xml") + @Metadata(description = "Sets the binding mode to use.", + defaultValue = "off", enums = "off,auto,json,xml,json_xml") private String bindingMode; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(description = "Sets the class name to use for binding from input to POJO for the incoming data.", + label = "advanced") private String type; @XmlTransient private Class<?> typeClass; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(description = "Sets the class name to use for binding from POJO to output for the outgoing data.", + label = "advanced") private String outType; @XmlTransient private Class<?> outTypeClass; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @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") private String skipBindingOnErrorCode; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to enable validation of the client request to check whether Content-Type/Accept headers, required parameters, and message body are valid.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String clientRequestValidation; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(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.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String clientResponseValidation; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to enable CORS headers in the HTTP response.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String enableCORS; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to return HTTP 204 with an empty body when a response contains an empty JSON object or XML root object.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String enableNoContentResponse; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(description = "Sets the component name that this definition will apply to.", + label = "advanced") private String component; public RestBindingDefinition() { 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 86cb1e814c50..232e32792b22 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 @@ -41,13 +41,16 @@ import org.apache.camel.support.CamelContextHelper; public class RestConfigurationDefinition { @XmlAttribute - @Metadata(enums = "platform-http,servlet,jetty,undertow,netty-http,coap") + @Metadata(description = "The Camel Rest component to use for the REST transport (consumer), such as netty-http, jetty, servlet, undertow.", + enums = "platform-http,servlet,jetty,undertow,netty-http,coap") private String component; @XmlAttribute - @Metadata(label = "consumer,advanced", enums = "openapi,swagger") + @Metadata(description = "The name of the Camel component to use as the REST API (such as OpenApi).", + label = "consumer,advanced", enums = "openapi,swagger") private String apiComponent; @XmlAttribute - @Metadata(label = "producer,advanced", enums = "vertx-http,http,undertow,netty-http") + @Metadata(description = "Sets the name of the Camel component to use as the REST producer.", + label = "producer,advanced", enums = "vertx-http,http,undertow,netty-http") private String producerComponent; @XmlAttribute private String scheme; @@ -56,79 +59,104 @@ public class RestConfigurationDefinition { @XmlAttribute private String port; @XmlAttribute - @Metadata(label = "consumer,advanced") + @Metadata(description = "To use a specific hostname for the API documentation (such as swagger or openapi). This can be used to override the generated host with this configured hostname.", + label = "consumer,advanced") private String apiHost; @XmlAttribute - @Metadata(label = "consumer,advanced", javaType = "java.lang.Boolean") + @Metadata(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.", + label = "consumer,advanced", javaType = "java.lang.Boolean") private String useXForwardHeaders; @XmlAttribute - @Metadata(label = "producer,advanced") + @Metadata(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.", + label = "producer,advanced") private String producerApiDoc; @XmlAttribute - @Metadata(label = "consumer") + @Metadata(description = "Sets a leading context-path the REST services will be using. This can be used when using components such as camel-servlet where the deployed web application is deployed using a context-path.", + label = "consumer") private String contextPath; @XmlAttribute - @Metadata(label = "consumer") + @Metadata(description = "Sets a leading context-path the REST API will be using.", + label = "consumer") private String apiContextPath; @XmlAttribute - @Metadata(label = "consumer,advanced") + @Metadata(description = "Sets the route id to use for the route that services the REST API. The route will by default use an auto assigned route id.", + label = "consumer,advanced") private String apiContextRouteId; @XmlAttribute - @Metadata(label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether vendor extension is enabled in the Rest APIs. If enabled then Camel will include additional information as vendor extension (eg keys starting with x-) such as route ids, class names etc.", + label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String apiVendorExtension; @XmlAttribute - @Metadata(label = "consumer,advanced", defaultValue = "allLocalIp") + @Metadata(description = "If no hostname has been explicit configured, then this resolver is used to compute the hostname the REST service will be using.", + label = "consumer,advanced", defaultValue = "allLocalIp") private RestHostNameResolver hostNameResolver; @XmlAttribute - @Metadata(defaultValue = "off", enums = "off,auto,json,xml,json_xml") + @Metadata(description = "Sets the binding mode to use.", + defaultValue = "off", enums = "off,auto,json,xml,json_xml") private RestBindingMode bindingMode; @XmlAttribute - @Metadata(label = "consumer,advanced") + @Metadata(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.", + label = "consumer,advanced") private String bindingPackageScan; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @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") private String skipBindingOnErrorCode; @XmlAttribute - @Metadata(label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to enable validation of the client request to check whether Content-Type/Accept headers, required parameters, and message body are valid.", + label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String clientRequestValidation; @XmlAttribute - @Metadata(label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(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.", + label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String clientResponseValidation; @XmlAttribute - @Metadata(label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to enable CORS headers in the HTTP response.", + label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String enableCORS; @XmlAttribute - @Metadata(label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to return HTTP 204 with an empty body when a response contains an empty JSON object or XML root object.", + label = "consumer,advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String enableNoContentResponse; @XmlAttribute - @Metadata(label = "consumer", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(description = "Inline routes in rest-dsl which are linked using direct endpoints. By inlining, Camel can optimize and inline this as a single route, however this requires to use direct endpoints, which must be unique per service.", + label = "consumer", javaType = "java.lang.Boolean", defaultValue = "true") private String inlineRoutes; @XmlAttribute - @Metadata(label = "advanced", enums = "jackson,jsonb,fastjson,gson", defaultValue = "jackson") + @Metadata(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.", + label = "advanced", enums = "jackson,jsonb,fastjson,gson", defaultValue = "jackson") private String jsonDataFormat; @XmlAttribute - @Metadata(label = "advanced", enums = "jaxb,jacksonXml", defaultValue = "jaxb") + @Metadata(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.", + label = "advanced", enums = "jaxb,jacksonXml", defaultValue = "jaxb") private String xmlDataFormat; @XmlElement(name = "componentProperty") - @Metadata(label = "advanced") + @Metadata(description = "Allows to configure as many additional properties for the rest component in use.", + label = "advanced") private List<RestPropertyDefinition> componentProperties = new ArrayList<>(); @XmlElement(name = "endpointProperty") - @Metadata(label = "advanced") + @Metadata(description = "Allows to configure as many additional properties for the rest endpoint in use.", + label = "advanced") private List<RestPropertyDefinition> endpointProperties = new ArrayList<>(); @XmlElement(name = "consumerProperty") - @Metadata(label = "consumer,advanced") + @Metadata(description = "Allows to configure as many additional properties for the rest consumer in use.", + label = "consumer,advanced") private List<RestPropertyDefinition> consumerProperties = new ArrayList<>(); @XmlElement(name = "dataFormatProperty") - @Metadata(label = "advanced") + @Metadata(description = "Allows to configure as many additional properties for the data formats in use. For example set property prettyPrint to true to have json outputted in pretty mode.", + label = "advanced") private List<RestPropertyDefinition> dataFormatProperties = new ArrayList<>(); @XmlElement(name = "apiProperty") - @Metadata(label = "consumer,advanced") + @Metadata(description = "Allows to configure as many additional properties for the api documentation.", + label = "consumer,advanced") private List<RestPropertyDefinition> apiProperties = new ArrayList<>(); @XmlElement(name = "corsHeaders") - @Metadata(label = "consumer,advanced") + @Metadata(description = "Allows to configure custom CORS headers.", + label = "consumer,advanced") private List<RestPropertyDefinition> corsHeaders = new ArrayList<>(); @XmlElement(name = "validationLevels") - @Metadata(label = "consumer,advanced") + @Metadata(description = "Allows to configure custom validation levels when using camel-openapi-validator with client request/response validator.", + label = "consumer,advanced") private List<RestPropertyDefinition> validationLevels = new ArrayList<>(); public String getComponent() { 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 f95fa652acc8..d4de480f2556 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 @@ -76,39 +76,50 @@ public class RestDefinition extends OptionalIdentifiedDefinition<RestDefinition> @XmlAttribute private String produces; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(description = "Whether to disable this REST service from the route during build time. Once an REST service has been disabled then it cannot be enabled later at runtime.", + label = "advanced", javaType = "java.lang.Boolean") private String disabled; @XmlAttribute - @Metadata(defaultValue = "off", enums = "off,auto,json,xml,json_xml") + @Metadata(description = "Sets the binding mode to use. This option will override what may be configured on a parent level.", + defaultValue = "off", enums = "off,auto,json,xml,json_xml") private String bindingMode; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @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") private String skipBindingOnErrorCode; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to enable validation of the client request to check whether Content-Type/Accept headers, required parameters, and message body are valid.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String clientRequestValidation; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(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.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String clientResponseValidation; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String enableCORS; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to return HTTP 204 with an empty body when a response contains an empty JSON object or XML root object.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String enableNoContentResponse; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(description = "Whether to include or exclude this rest operation in API documentation. This option will override what may be configured on a parent level.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") private String apiDocs; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(description = "To configure a special tag for the operations within this rest definition.", + label = "advanced") private String tag; @XmlElement private OpenApiDefinition openApi; @XmlElement(name = "securityDefinitions") // use the name Swagger/OpenAPI uses - @Metadata(label = "security") + @Metadata(description = "Sets the security definitions such as Basic, OAuth2 etc.", + label = "security") private RestSecuritiesDefinition securityDefinitions; @XmlElement - @Metadata(label = "security") + @Metadata(description = "Sets the security requirement(s) for all endpoints.", + label = "security") private List<SecurityDefinition> securityRequirements = new ArrayList<>(); @XmlElementRef private List<VerbDefinition> verbs = new ArrayList<>(); diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestSecurityDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestSecurityDefinition.java index 78b42c2ae3fb..4fcc4940e1f7 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestSecurityDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestSecurityDefinition.java @@ -33,7 +33,8 @@ public abstract class RestSecurityDefinition { RestDefinition rest; @XmlAttribute(required = true) - @Metadata(required = true) + @Metadata(description = "Key used to refer to this security definition.", + required = true) private String key; @XmlAttribute private String description; diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/SecurityDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/SecurityDefinition.java index 47c63462d666..32ecb6952744 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/SecurityDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/SecurityDefinition.java @@ -32,7 +32,8 @@ import org.apache.camel.spi.Metadata; public class SecurityDefinition { @XmlAttribute(required = true) - @Metadata(required = true) + @Metadata(description = "Key used to refer to this security definition.", + required = true) private String key; @XmlAttribute private String scopes; 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 d598b880a99a..93bafe479967 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 @@ -56,44 +56,56 @@ public abstract class VerbDefinition extends OptionalIdentifiedDefinition<VerbDe @XmlAttribute private String produces; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(description = "Whether to disable this REST service from the route during build time. Once an REST service has been disabled then it cannot be enabled later at runtime.", + label = "advanced", javaType = "java.lang.Boolean") private String disabled; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(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.", + label = "advanced") private String type; @XmlTransient private Class<?> typeClass; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(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.", + label = "advanced") private String outType; @XmlTransient private Class<?> outTypeClass; @XmlAttribute - @Metadata(defaultValue = "off", enums = "off,auto,json,xml,json_xml") + @Metadata(description = "Sets the binding mode to use. This option will override what may be configured on a parent level.", + defaultValue = "off", enums = "off,auto,json,xml,json_xml") private String bindingMode; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @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") private String skipBindingOnErrorCode; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to enable validation of the client request to check whether Content-Type/Accept headers, required parameters, and message body are valid.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String clientRequestValidation; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(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.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String clientResponseValidation; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String enableCORS; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Whether to return HTTP 204 with an empty body when a response contains an empty JSON object or XML root object.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String enableNoContentResponse; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(description = "Whether to include or exclude this rest operation in API documentation.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") private String apiDocs; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(description = "Marks this rest operation as deprecated in OpenApi documentation.", + label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") private String deprecated; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(description = "Whether stream caching is enabled on this rest operation.", + label = "advanced", javaType = "java.lang.Boolean") private String streamCache; @XmlAttribute private String routeId;
