YAML natively supports node references
yaml.org
yaml.org
I was quite impressed about this feature. It could reduce nice amount of boilerplate in docker-compose.yaml files or application.yaml Spring configs.
I've moved on to CUE (https://cuelang.org | https://cuetorials.com) which can output both yaml & json for the tools that need it. You'll find references and more that can reduce boilerplate while also ensuring that what you wrote will work once it reaches those tools.