This is an automated email from the ASF dual-hosted git repository.

Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-upgrade-recipes.git


The following commit(s) were added to refs/heads/main by this push:
     new 32b1770  Provide real usage examples for custom recipe options
32b1770 is described below

commit 32b17705a791248470ec4cb0710c2c4bc285dd86
Author: Tim te Beek <[email protected]>
AuthorDate: Thu Aug 6 14:30:43 2026 +0200

    Provide real usage examples for custom recipe options
    
    Replace the TODO placeholders on @Option example attributes with values
    taken from the recipes' existing usages in the shipped YAML definitions.
    
    Also correct the newPropertyKey displayName/description in the four
    ReplaceProperty* recipes, which were copy-pasted from
    ChangePropertyKeyWithCaseChange and described a prefix rather than a key.
---
 .../upgrade/customRecipes/ChangePropertyKeyWithCaseChange.java    | 4 ++--
 .../camel/upgrade/customRecipes/LiteralRegexpConverterRecipe.java | 4 ++--
 .../upgrade/customRecipes/MoveGetterToExtendedCamelContext.java   | 2 +-
 .../camel/upgrade/customRecipes/MoveGetterToPluginHelper.java     | 2 +-
 .../camel/upgrade/customRecipes/PropertiesAndYamlKeyUpdate.java   | 4 ++--
 .../upgrade/customRecipes/ReplacePropertyInComponentXml.java      | 8 ++++----
 .../upgrade/customRecipes/ReplacePropertyInComponentYaml.java     | 8 ++++----
 .../upgrade/customRecipes/ReplacePropertyInDataFormatXml.java     | 8 ++++----
 .../upgrade/customRecipes/ReplacePropertyInDataFormatYaml.java    | 8 ++++----
 9 files changed, 24 insertions(+), 24 deletions(-)

diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ChangePropertyKeyWithCaseChange.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ChangePropertyKeyWithCaseChange.java
index 991d672..b0ae776 100644
--- 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ChangePropertyKeyWithCaseChange.java
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ChangePropertyKeyWithCaseChange.java
@@ -30,11 +30,11 @@ import java.util.List;
  */
 public class ChangePropertyKeyWithCaseChange extends Recipe {
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Old property key",
+    @Option(example = "camel.main.routeController(.*)", displayName = "Old 
property key",
             description = "The property key to rename.")
     String oldPropertyKey;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "New prefix before any group",
+    @Option(example = "camel.routeController.", displayName = "New prefix 
before any group",
             description = "The prefix to be replaced with.")
     String newPrefix;
 
diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/LiteralRegexpConverterRecipe.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/LiteralRegexpConverterRecipe.java
index 291f49c..0996247 100644
--- 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/LiteralRegexpConverterRecipe.java
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/LiteralRegexpConverterRecipe.java
@@ -32,11 +32,11 @@ import java.util.regex.Matcher;
  */
 public class LiteralRegexpConverterRecipe extends Recipe {
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Literal regexp name",
+    @Option(example = "(\\{\\{aws:[^/]+)/([^/]+}})", displayName = "Literal 
regexp name",
             description = "Regexp for matching a literal.")
     public String regexp;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Replacement to use",
+    @Option(example = "${1}#${2}", displayName = "Replacement to use",
             description = "Replacement to use.")
     public String replacement;
 
diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/MoveGetterToExtendedCamelContext.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/MoveGetterToExtendedCamelContext.java
index aa661a9..35c29b3 100644
--- 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/MoveGetterToExtendedCamelContext.java
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/MoveGetterToExtendedCamelContext.java
@@ -30,7 +30,7 @@ import org.openrewrite.java.tree.J;
  */
 public class MoveGetterToExtendedCamelContext extends Recipe {
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Method name",
+    @Option(example = "getStartupStepRecorder", displayName = "Method name",
             description = "Name of the method on external camel context.")
     public String oldMethodName;
 
diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/MoveGetterToPluginHelper.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/MoveGetterToPluginHelper.java
index 6a525e4..c41484c 100644
--- 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/MoveGetterToPluginHelper.java
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/MoveGetterToPluginHelper.java
@@ -35,7 +35,7 @@ public class MoveGetterToPluginHelper extends Recipe {
     private static final Pattern EXTERNAL_CONTEXT_TYPE = 
Pattern.compile("org.apache.camel.ExtendedCamelContext");
     private static final String MATCHER_CONTEXT_GET_EXT = 
"org.apache.camel.CamelContext getExtension(java.lang.Class)";
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Method name",
+    @Option(example = "getRoutesLoader", displayName = "Method name",
             description = "Name of the method on external camel context.")
     public String oldMethodName;
 
diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/PropertiesAndYamlKeyUpdate.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/PropertiesAndYamlKeyUpdate.java
index a9744aa..1032ae1 100644
--- 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/PropertiesAndYamlKeyUpdate.java
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/PropertiesAndYamlKeyUpdate.java
@@ -8,11 +8,11 @@ import java.util.List;
 
 public class PropertiesAndYamlKeyUpdate extends Recipe {
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Old configuration key",
+    @Option(example = "camel.springboot.routeControllerSuperviseEnabled", 
displayName = "Old configuration key",
             description = "The configuration key to rename.")
     String oldPropertyKey;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "New configuration key",
+    @Option(example = "camel.routecontroller.enabled", displayName = "New 
configuration key",
             description = "The configuration to be replaced with.")
     String newPropertyKey;
 
diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInComponentXml.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInComponentXml.java
index d4f6cb1..ebf85fd 100644
--- 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInComponentXml.java
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInComponentXml.java
@@ -34,16 +34,16 @@ public class ReplacePropertyInComponentXml extends Recipe {
     private static final XPathMatcher TO_MATCHER = new 
XPathMatcher("//route/to");
 
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Component",
+    @Option(example = "netty", displayName = "Component",
             description = "Component name.")
     String component;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Old property key",
+    @Option(example = "keyStoreFile", displayName = "Old property key",
             description = "The property key to rename.")
     String oldPropertyKey;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "New prefix before any group",
-            description = "The prefix to be replaced with.")
+    @Option(example = "keyStoreResource", displayName = "New property key",
+            description = "The property key to be replaced with.")
     String newPropertyKey;
 
     @Option(example = "file:", displayName = "New prefix before value of the 
changed property",
diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInComponentYaml.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInComponentYaml.java
index 634bc1b..37c4747 100644
--- 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInComponentYaml.java
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInComponentYaml.java
@@ -30,16 +30,16 @@ import java.util.Optional;
 
 public class ReplacePropertyInComponentYaml extends Recipe {
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Component",
+    @Option(example = "netty", displayName = "Component",
             description = "Component name.")
     String component;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Old property key",
+    @Option(example = "keyStoreFile", displayName = "Old property key",
             description = "The property key to rename.")
     String oldPropertyKey;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "New prefix before any group",
-            description = "The prefix to be replaced with.")
+    @Option(example = "keyStoreResource", displayName = "New property key",
+            description = "The property key to be replaced with.")
     String newPropertyKey;
 
     @Option(example = "file:", displayName = "New prefix before value of the 
changed property",
diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInDataFormatXml.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInDataFormatXml.java
index b7e5330..94237f3 100644
--- 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInDataFormatXml.java
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInDataFormatXml.java
@@ -28,16 +28,16 @@ import org.openrewrite.xml.tree.Xml;
 public class ReplacePropertyInDataFormatXml extends Recipe {
 
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Component",
+    @Option(example = "crypto", displayName = "Component",
             description = "Component name.")
     String component;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Old property key",
+    @Option(example = "algorithmParameterRef", displayName = "Old property 
key",
             description = "The property key to rename.")
     String oldPropertyKey;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "New prefix before any group",
-            description = "The prefix to be replaced with.")
+    @Option(example = "algorithmParameterSpec", displayName = "New property 
key",
+            description = "The property key to be replaced with.")
     String newPropertyKey;
 
     public ReplacePropertyInDataFormatXml() {
diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInDataFormatYaml.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInDataFormatYaml.java
index e2d04dc..7a796ed 100644
--- 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInDataFormatYaml.java
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/customRecipes/ReplacePropertyInDataFormatYaml.java
@@ -27,16 +27,16 @@ import org.openrewrite.yaml.tree.Yaml;
 
 public class ReplacePropertyInDataFormatYaml extends Recipe {
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Component",
+    @Option(example = "crypto", displayName = "Component",
             description = "Component name.")
     String component;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "Old property key",
+    @Option(example = "algorithmParameterRef", displayName = "Old property 
key",
             description = "The property key to rename.")
     String oldPropertyKey;
 
-    @Option(example = "TODO Provide a usage example for the docs", displayName 
= "New prefix before any group",
-            description = "The prefix to be replaced with.")
+    @Option(example = "algorithmParameterSpec", displayName = "New property 
key",
+            description = "The property key to be replaced with.")
     String newPropertyKey;
 
     public ReplacePropertyInDataFormatYaml() {

Reply via email to