[
https://issues.apache.org/jira/browse/CAMEL-25407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-25407 started by Claus Ibsen.
-------------------------------------------
> Endpoint uri options keep the order they are written in
> -------------------------------------------------------
>
> Key: CAMEL-25407
> URL: https://issues.apache.org/jira/browse/CAMEL-25407
> Project: Camel
> Issue Type: Improvement
> Components: camel-core, camel-yaml-dsl
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.23.0
>
>
> The query options of an endpoint uri built from a map of options are sorted
> by name, also when the options have an order, such as the parameters of an
> endpoint in the YAML DSL:
> {code}
> - to:
> uri: seda
> parameters:
> name: foo
> size: 1234
> multipleConsumers: true
> {code}
> builds {{seda:foo?multipleConsumers=true&size=1234}}. To keep route dumps
> idempotent, CAMEL-25381 (#27449) then sorted the options of a YAML route dump
> as well, so a dump no longer shows the options in the order the route has
> them (DumpModelAsYamlUriAsParametersTest fails).
> EndpointUriFactory.buildUri, the catalog asEndpointUri and the YAML DSL
> should keep the order of an ordered map (LinkedHashMap, SortedMap), and sort
> a map without an order (HashMap) as before. The YAML dump then writes the
> options in the order they are written. The endpoint resolved is the same, as
> Camel sorts the options when it normalizes the uri.
> PR: https://github.com/apache/camel/pull/27474
> _Created by Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)