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

Merging sources override objects instead of merging #10

Closed
StummeJ opened this issue Aug 21, 2023 · 0 comments
Closed

Merging sources override objects instead of merging #10

StummeJ opened this issue Aug 21, 2023 · 0 comments

Comments

@StummeJ
Copy link
Contributor

StummeJ commented Aug 21, 2023

Good morning,

We noticed that when you have layered configs, where the environment specific layer only contains modified entries, that objects are not getting merged, but replaced. My expected behavior would be that the layers would be merged, overriding any values that contained further changes.

appsettings.yaml

logging:
  level: debug
  my_service:
    level: trace
auth:
  token_length: 7

appsettings.prod.yaml

logging:
  my_service:
    level: info

actual builder.buld()

{
  logger: {
    my_service: {
      level:info
    }
  },
  auth: {
    token_length: 7
  }
}

expected builder.buld()

{
  logger: {
    level: debug
    my_service: {
      level:info
    }
  },
  auth: {
    token_length: 7
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants