fix(galaxyrepo): drop no-op ValidateOnStart (consumer owns validation)

This commit is contained in:
Joseph Doherty
2026-06-23 20:36:28 -04:00
parent 2c6c764d3c
commit 94512acf1f
@@ -36,10 +36,12 @@ public static class GalaxyRepositoryServiceCollectionExtensions
ArgumentNullException.ThrowIfNull(configuration); ArgumentNullException.ThrowIfNull(configuration);
ArgumentException.ThrowIfNullOrWhiteSpace(sectionPath); 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 services
.AddOptions<GalaxyRepositoryOptions>() .AddOptions<GalaxyRepositoryOptions>()
.Bind(configuration.GetSection(sectionPath)) .Bind(configuration.GetSection(sectionPath));
.ValidateOnStart();
services.AddSingleton(sp => services.AddSingleton(sp =>
new GalaxyRepository(sp.GetRequiredService<IOptions<GalaxyRepositoryOptions>>().Value)); new GalaxyRepository(sp.GetRequiredService<IOptions<GalaxyRepositoryOptions>>().Value));