It would be great if you could replace it to DefaultModelMetadataProvider instead, so it wont override default Mvc services after calling AddMvcCore().
Also I would encourage you to call TryAddSingleton instead since it is a Mvc framework service and it could be registered already.
Hey, I
m working on built-in Mvc model validation with
IObjectModelValidator` and it was not working due to service override in this line. https://github.com/vitalybibikov/AzureExtensions.Swashbuckle/blob/237b19b61100f59d1a8f60066f94c102fe5eebe1/src/AzureFunctions.Extensions.Swashbuckle/AzureFunctions.Extensions.Swashbuckle/SwashBuckleStartupExtension.cs#L49It would be great if you could replace it to
DefaultModelMetadataProvider
instead, so it wont override default Mvc services after callingAddMvcCore()
.Also I would encourage you to call
TryAddSingleton
instead since it is a Mvc framework service and it could be registered already.Thanks!