rocketraman
03/18/2024, 12:15 PMsam
03/18/2024, 12:35 PMsam
03/18/2024, 12:35 PMrocketraman
03/28/2024, 6:40 PMParameterMapper
transforms data class params to various values that are looked up in the node tree, but I'm wondering if many of the `ParameterMapper`'s could actually be turned into `NodeNormalizer`'s that instead operate on the node tree to normalize the paths.
This would allow different sources to use different idiomatic naming but all will get merged correctly. For example:
foo.conf
containing the hocon standard approach of abc.foo-bar
and an env var ABC_FOOBAR
would both get mapped to data class Foo { val fooBar: String }
.
You can see an early implementation of the NodeNormalizer
that operates only on prefixes here, but we could move a lot of ParameterMapper
logic to `NodeNormalizer`s as well: https://github.com/rocketraman/hoplite/commit/6ebe5335b9574c973bd675dcc6fdc2caf33ab1cc
Would love your thoughts.