[
https://issues.apache.org/jira/browse/CAMEL-22203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-22203.
---------------------------------
Resolution: Not A Bug
You cannot do as you do
> [camel-paho-mqtt/camel-path-mqtt5] Error setting customWebSocketHeaders
> parameters via yaml dsl
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-22203
> URL: https://issues.apache.org/jira/browse/CAMEL-22203
> Project: Camel
> Issue Type: Bug
> Components: camel-paho, camel-paho-mqtt5
> Affects Versions: 4.8.8, 4.10.5, 4.11.0, 4.12.0
> Reporter: Luis Sergio Faria Carneiro
> Priority: Minor
>
> Consider the following yaml dsl codes:
> {code:yaml}
> - from:
> uri: rest:post:/test
> steps:
> - to:
> uri: paho-mqtt:test
> parameters:
> customWebSocketHeaders:
> header1: value1
> header2: value2
> {code}
> {code:yaml}
> - from:
> uri: rest:post:/test
> steps:
> - to:
> uri: paho-mqtt5:test
> parameters:
> customWebSocketHeaders:
> header1: value1
> header2: value2
> {code}
> Per the documentation, the customWebSocketHeaders parameters is of type Map,
> and is declared as so above.
> However, running either of the examples above with jbang yields the following
> error:
> {code:java}
> Node type map is invalid, expected key-value
> in file:integration.yaml, line 7, column 13:
> customWebSocketHeaders:
> ^
> at
> org.apache.camel.dsl.yaml.common.YamlDeserializerSupport.asScalarMap(YamlDeserializerSupport.java:220)
> {code}
> This is the same kind of problem as in
> https://issues.apache.org/jira/browse/CAMEL-20678, where a parameter has a
> non-scalar type.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)