Skip to content

Commit

Permalink
Make configuration properties case-insensitive (closes #619).
Browse files Browse the repository at this point in the history
  • Loading branch information
Guy Fankam committed Aug 14, 2024
1 parent 20775c5 commit be20f7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/code/common/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static ConfigurationJson From(IConfiguration configuration) =>

private static JsonNode? SerializeConfiguration(IConfiguration configuration)
{
var jsonObject = new JsonObject();
var jsonObject = new JsonObject(nodeOptions);

foreach (var child in configuration.GetChildren())
{
Expand Down Expand Up @@ -107,7 +107,7 @@ public ConfigurationJson MergeWith(ConfigurationJson other) =>

private static JsonObject OverrideWith(JsonObject current, JsonObject other)
{
var merged = new JsonObject();
var merged = new JsonObject(nodeOptions);

foreach (var property in current)
{
Expand Down
3 changes: 2 additions & 1 deletion tools/code/publisher/OverrideDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public static T Override<T>(T current, JsonObject other)

private static JsonObject Override(JsonObject current, JsonObject other)
{
var merged = new JsonObject();
var nodeOptions = new JsonNodeOptions { PropertyNameCaseInsensitive = true };
var merged = new JsonObject(nodeOptions);

foreach (var property in current)
{
Expand Down

0 comments on commit be20f7b

Please sign in to comment.