Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate keys in yaml #210

Open
traceyyoshima opened this issue Jul 19, 2022 · 0 comments
Open

Remove duplicate keys in yaml #210

traceyyoshima opened this issue Jul 19, 2022 · 0 comments
Labels
recipe Recipe requested

Comments

@traceyyoshima
Copy link
Contributor

traceyyoshima commented Jul 19, 2022

In Yaml, a key may contain . like a.b.c:true.
In Spring, the values are resolved like properties so multiple values may be mapped to a single configuration property.

--- 
a: 
  b: 
    c: true
  b.c: ~
a.b: 
  c: false

@sanagaraj-pivotal requested a recipe to remove the duplicate keys
that prioritizes the last matched value.

Example
Choose 8080:

server.port: 9999
server:
  port: 8080

Choose 9999:

server:
  port: 8080
server.port: 9999
@traceyyoshima traceyyoshima added the recipe Recipe requested label Jul 19, 2022
@traceyyoshima traceyyoshima moved this to Backlog in OpenRewrite Jul 19, 2022
@timtebeek timtebeek moved this from Backlog to Recipes Wanted in OpenRewrite May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Recipe requested
Projects
Status: Recipes Wanted
Development

No branches or pull requests

1 participant