[
https://issues.apache.org/jira/browse/CAMEL-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17643995#comment-17643995
]
Karen Lease commented on CAMEL-18748:
-------------------------------------
If we want to enforce that only one kind of error handler can be specified, we
can do it like this in the schema camelYamlDsl:
{code:java}
"oneOf": [
{"required": ["deadLetterChannel"]},
{"required": ["defaultErrorHandler"]},
{"required": ["noErrorHandler"]},
{"required": ["jtaTransactionErrorHandler"]},
{"required": ["springTransactionErrorHandler"]}
]{code}
But while trying to validate a yaml file with this, I found that this kind of
errorHandler (org.apache.camel.model.ErrorHandlerDefinition) is only referenced
from org.apache.camel.model.RouteConfigurationDefinition which itself is not
referenced in the schema because the "route-configuration" key is not present
in the list of top-level properties listed in the schema.
I'm not sure if that's intentional or not.
> camel-catalog - Missing properties for ErrorHandler in catalog
> ---------------------------------------------------------------
>
> Key: CAMEL-18748
> URL: https://issues.apache.org/jira/browse/CAMEL-18748
> Project: Camel
> Issue Type: Bug
> Components: camel-catalog
> Reporter: Marat Gubaidullin
> Priority: Major
> Fix For: 3.20.0
>
>
> Different properties for the ErrorHandler model in catalog and
> camelYamlDsl.json
> [https://github.com/apache/camel/blob/main/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/errorHandler.json]
> and
> [https://github.com/apache/camel/blob/30029a9f3f02befd111e57a301025d94fe565c73/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json#L760]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)