FSharp.Configuration
FSharp.Configuration copied to clipboard
Yaml merge syntax
Given the following YAML:
Default: &Default
Db:
ConnectionString: Data Source=localhost;Initial Catalog=;Integrated Security=True;Application Name=
Test: &Test
Environment: Test
<<: *Default
ActiveConfig:
<<: *Test
I would think that I should access the desired key like this:
open FSharp.Configuration
type Config = YamlConfig<"Config.yaml">
let config = Config ()
let value = config.ActiveConfig.Environment
But, as it turns out, the resulting type is structured like this:
let value = config.ActiveConfig.``<<``.Environment
Am I missing something? Obviously using the << property is not logical or convenient.