fix(galaxyrepo): drop no-op ValidateOnStart (consumer owns validation)
This commit is contained in:
+4
-2
@@ -36,10 +36,12 @@ public static class GalaxyRepositoryServiceCollectionExtensions
|
||||
ArgumentNullException.ThrowIfNull(configuration);
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(sectionPath);
|
||||
|
||||
// Bind only — this shared lib ships no validator, so a .ValidateOnStart() here
|
||||
// would be a silent no-op. The consuming application owns option validation
|
||||
// (e.g. the sidecar's ConfigPreflight / validated-options layer).
|
||||
services
|
||||
.AddOptions<GalaxyRepositoryOptions>()
|
||||
.Bind(configuration.GetSection(sectionPath))
|
||||
.ValidateOnStart();
|
||||
.Bind(configuration.GetSection(sectionPath));
|
||||
|
||||
services.AddSingleton(sp =>
|
||||
new GalaxyRepository(sp.GetRequiredService<IOptions<GalaxyRepositoryOptions>>().Value));
|
||||
|
||||
Reference in New Issue
Block a user