Change Camel component URI in YAML DSL

Apache 2.0

Transforms component URIs in YAML DSL using regular expressions with capturing groups.

org.apache.camel.upgrade.customRecipes.internal.ChangeYamlComponentUriRecipe

Required

Regular expression to match the component URI. Use capturing groups for parts to preserve.

Replacement string using ${1}, ${2}, etc. to reference capturing groups from the pattern.

Optional

consumerOnlyBoolean

When true, only from.uri endpoints are transformed; other uri fields are left unchanged.

mod run . --recipe=org.apache.camel.upgrade.customRecipes.internal.ChangeYamlComponentUriRecipe \ -P uriPattern='^pulsar:((persistent|non-persistent)://([^/]+)/([^/]+)/([^/]+)/(.+))$' \ -P replacement='pulsar:${2}://${3}/${5}/${6}'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.