Change property key
Apache 2.0Change a YAML property key while leaving the value intact. Expects dot notation for nested YAML mappings, similar to how Spring Boot interprets application.yml files.
org. openrewrite. yaml. ChangePropertyKeyRequired
The property key to rename. Supports glob patterns.
The new name for the property key.
Optional
Whether to match the oldPropertyKey using relaxed binding rules. Defaults to true. If you want to use exact matching in your search, set this to false.
If any of these property keys exist as direct children of oldPropertyKey, then they will not be moved to newPropertyKey. Separate values with commas.
A glob expression representing a file path to search for (relative to the project root). Blank/null matches all.
mod run . --recipe= org. openrewrite. yaml. ChangePropertyKey \
-P oldPropertyKey= 'management. metrics. binders. *. enabled' \
-P newPropertyKey= management. metrics. enable. process. filesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.