Skip to content

Merging sources override objects instead of merging #10

Closed
@StummeJ

Description

@StummeJ

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
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions