Microsoft.AspNetCore.OpenApi throws confusing exception (transitioning away from swagger) - C#