Skip to content

Conversation

finnvoor
Copy link

@finnvoor finnvoor commented Oct 1, 2025

Motivation

Docs mention:

// Only remap the environment variables, not the JSON config
let keyMappedEnvProvider = KeyMappingProvider(upstream: envProvider) { key in
    key.prepending(["myapp", "prod"])
}

but prepending(_:)/appending(_:) were internal.

Modifications

Switched internal to public.

Result

KeyMappingProvider is easier to use :-)

Test Plan

n/a

@czechboy0
Copy link
Contributor

Thanks for the PR, @finnvoor - I'll take a look next week, attending ServerSide.Swift in London this week.

Copy link
Contributor

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @finnvoor - I agree it'll be useful to make these public, let's just duplicate the first one and only publicize a non-optional variant.

@czechboy0
Copy link
Contributor

Could you add a few unit tests for these two methods please? To make sure the path and context get combined correctly.

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

Successfully merging this pull request may close these issues.

2 participants