Skip to content

Add support for nested configuration keys #31

@bjarkih

Description

@bjarkih

We extend our properties loader to handle configuration keys that encode a nested configuration path using dot notation. For example, a configuration file containing the following assignment

parent.child.property: myValue

represents the following configuration hierarchy:

parent
    child
        property: myValue

Example

Consider the following traditional hierarchy:

platforms
    fusion
        - host: localhost
        - port: 9090
        - collection: documents_collection
        people
            - collection: people_collection

The same hierarchy can be represented in a flat format as follows:

platforms.fusion.host: localhost
platforms.fusion.port: 9090
platforms.fusion.collection: documents_collection
platforms.fusion.people.collection: people_collection

This achieves the same level of brevity in configuration (using hierarchical configuration syntax) with less overhead in terms of files under management.

Combining nested keys with a file tree hierarchy

We can combine configuration files with nested keys with a traditional configuration represented by a file hierarchy.

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