Replies: 2 comments 4 replies
-
Find and replace is conceptually an activity applied to textual source. When using the Using find and replace in a declarative YAML recipe will work, but it's a very common mistake that users run into when they then try to then compose language aware recipes after the find and replace operation occurred. So often a mistake that it's documented explicitly that language specific operations should be applied first and then find and replace applied at the very end. You can see that documented here: https://docs.openrewrite.org/recipes/text/findandreplace |
Beta Was this translation helpful? Give feedback.
-
@dayagz Do you not know what mapping needs replacing in your YAML? If you can't use ChangePropertyValue you could also implement a custom recipe that replaces any scalar value matching a given substring or pattern. |
Beta Was this translation helpful? Give feedback.
-
OpenRewrite YAML recipes currently do not support find and replace operations. The text-based find and replace modifies the structure, which prevents subsequent recipes from being applied. Could we consider adding a find and replace recipe?
Beta Was this translation helpful? Give feedback.
All reactions