From 94512acf1f9490406a5d5eecf3e25f0abda1fa4f Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 23 Jun 2026 20:36:28 -0400 Subject: [PATCH] fix(galaxyrepo): drop no-op ValidateOnStart (consumer owns validation) --- .../GalaxyRepositoryServiceCollectionExtensions.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ZB.MOM.WW.GalaxyRepository/src/ZB.MOM.WW.GalaxyRepository/DependencyInjection/GalaxyRepositoryServiceCollectionExtensions.cs b/ZB.MOM.WW.GalaxyRepository/src/ZB.MOM.WW.GalaxyRepository/DependencyInjection/GalaxyRepositoryServiceCollectionExtensions.cs index b69895d..38596c9 100644 --- a/ZB.MOM.WW.GalaxyRepository/src/ZB.MOM.WW.GalaxyRepository/DependencyInjection/GalaxyRepositoryServiceCollectionExtensions.cs +++ b/ZB.MOM.WW.GalaxyRepository/src/ZB.MOM.WW.GalaxyRepository/DependencyInjection/GalaxyRepositoryServiceCollectionExtensions.cs @@ -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() - .Bind(configuration.GetSection(sectionPath)) - .ValidateOnStart(); + .Bind(configuration.GetSection(sectionPath)); services.AddSingleton(sp => new GalaxyRepository(sp.GetRequiredService>().Value));