#296 will now do a crappy merge on the configuration

This commit is contained in:
Tom Gardham-Pallister
2018-04-16 20:28:15 +01:00
parent c5aa11f7fb
commit 2ed37cbc83
4 changed files with 191 additions and 32 deletions

View File

@ -45,6 +45,7 @@ namespace Ocelot.DependencyInjection
}
var lines = File.ReadAllText(file);
var config = JsonConvert.DeserializeObject<FileConfiguration>(lines);
if(file == "./ocelot.global.json")
@ -57,8 +58,11 @@ namespace Ocelot.DependencyInjection
}
var json = JsonConvert.SerializeObject(ocelotConfig);
File.WriteAllText("ocelot.json", json);
builder.AddJsonFile("ocelot.json");
return builder;
}
}