Open
Description
Background and Motivation
To improve the diagnosability of the OpenAPI layer, we'd like to provide logs so that users can understand what components are contributing custom IApiDescriptionProvider
implementations to the ApiExplorer
layer. In order to support this scenario, we need to support injecting an ILoggerFactory
instance to the ApiDescriptionGroupCollectionProvider
class that invokes all the discovered IApiDescriptionProvider
instances.
Proposed API
- public class ApiDescriptionGroupCollectionProvider : IApiDescriptionGroupCollectionProvider
+ public partial class ApiDescriptionGroupCollectionProvider : IApiDescriptionGroupCollectionProvider
{
+ public ApiDescriptionGroupCollectionProvider(
+ IActionDescriptorCollectionProvider actionDescriptorCollectionProvider,
+ IEnumerable<IApiDescriptionProvider> apiDescriptionProviders,
+ ILoggerFactory loggerFactory)
}
Alternative Designs
- Add a new internal-only implementation of
ApiDescriptionGroupCollectionProvider
and supportILoggerFactory
injection in its constructors.