Croway opened a new pull request, #22406:
URL: https://github.com/apache/camel/pull/22406
## Summary
When a Pipe YAML uses `{{placeholder}}` in Kamelet source/sink properties,
the curly braces are URL-encoded to `%7B%7B...%7D%7D` by
`URISupport.createQueryString()`, preventing Camel's property placeholder
resolver from recognizing them.
**Reproducer:**
```yaml
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
name: placeholder-bug
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: timer-source
properties:
message: "{{my.message}}"
sink:
uri: "log:result"
```
```bash
camel run pipe.yaml --prop=my.message="Hello Camel"
# Expected: logs "Hello Camel"
# Actual: logs "%7B%7Bmy.message%7D%7D"
```
**Root cause:** `extractCamelEndpointUri()` in `YamlRoutesBuilderLoader`
calls `URISupport.createQueryString(params)` which URL-encodes `{{` to `%7B%7B`
and `}}` to `%7D%7D`. The encoding itself is correct and necessary for special
characters, but property placeholder double-braces must be preserved.
**Fix:** After creating the query string, restore `%7B%7B` → `{{` and
`%7D%7D` → `}}` so Camel's property placeholder resolver can find them.
Jira: https://issues.apache.org/jira/browse/CAMEL-23284
--
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]