Delete property

Apache 2.0

Delete a YAML property. Nested YAML mappings are interpreted as dot separated property names, i.e. as Spring Boot interprets application.yml files like a.b.c.d or a.b.c:d.

org.openrewrite.yaml.DeleteProperty

Required

The key to be deleted. Supports glob patterns.

Optional

coalesceBoolean

(Deprecated: in a future version, this recipe will always use the false behavior) Simplify nested map hierarchies into their simplest dot separated property form.

relaxedBindingBoolean

Whether to match the propertyKey using relaxed binding rules. Defaults to true. If you want to use exact matching in your search, set this to false.

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.DeleteProperty \ -P propertyKey='management.metrics.binders.files.*'

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