davsclaus commented on code in PR #27474:
URL: https://github.com/apache/camel/pull/27474#discussion_r4204502498
##########
core/camel-support/src/main/java/org/apache/camel/support/component/EndpointUriFactorySupport.java:
##########
@@ -93,10 +95,24 @@ protected String buildPathParameter(
return uri;
}
+ /**
+ * A copy of the parameters to build the uri from: in their order when
they have one (a {@link LinkedHashMap} such
+ * as the parameters of a route in the YAML DSL, which then keep the order
they are written in), otherwise sorted.
+ */
+ protected static Map<String, Object> copyParameters(Map<String, Object>
parameters) {
+ if (isOrdered(parameters)) {
Review Comment:
Good catch, thanks. Fixed in 6ed847b62896: `copyParameters` copies a
`SortedMap` as a `TreeMap`, so on the generated path (`HashMap` → `TreeMap` →
`buildQueryParameters`) the flattened multi-value options are sorted with the
others again, as on main. Added `testJmsMultiValuedUnorderedGenerated`, which
goes through `copyParameters` like the generated factories and uses a prefix
(`tag.`) that sorts apart from its option name (`tags`), with `tagline` in
between.
_Claude Code on behalf of davsclaus_
##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc:
##########
@@ -2052,6 +2052,17 @@ now reports a top-level `from:` with the form to write,
the way it reports the o
form as well; a Kamelet's `template:` keeps its `from:`, which is the Kamelet
spec's shape. The classic schema and `camel run` are unchanged: the file keeps
working,
with the compact notation warning `camel run` already logged for it.
+=== camel-yaml-dsl - endpoint parameters keep the order they are written in
Review Comment:
Agreed. Created
[CAMEL-25407](https://issues.apache.org/jira/browse/CAMEL-25407) (fix version
4.23.0), which references CAMEL-25381 / #27449, and retitled the PR. The
ordered vs sorted rule is now in the Javadoc of `EndpointUriFactory.buildUri`
and `RuntimeCamelCatalog` / `CamelCatalog.asEndpointUri(Xml)` (6ed847b62896).
_Claude Code on behalf of davsclaus_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]