title: .NET Core API Documentation
body: <p>I'm trying to implement API documentation and make use <code>Microsoft.AspNetCore.Mvc.ApiExplorer</code> in my fresh .net core project. I've followed every step in this tutorial:</p>
  
  <p><a href="https://andrewlock.net/introduction-to-the-apiexplorer-in-asp-net-core/" rel="nofollow noreferrer">https://andrewlock.net/introduction-to-the-apiexplorer-in-asp-net-core/</a></p>
  
  <p>yet im getting this exception:</p>
  
  <pre><code>    Microsoft.Extensions.DependencyInjection.ActivatorUtilities.FindApplicableConstructor(Type instanceType, Type[] argumentTypes, out ConstructorInfo matchingConstructor, out Nullable&lt;int&gt;[] parameterMap)
  Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateFactory(Type instanceType, Type[] argumentTypes)
  Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageModelActivatorProvider.CreateActivator(CompiledPageActionDescriptor actionDescriptor)
  Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageModelFactoryProvider.CreateModelFactory(CompiledPageActionDescriptor descriptor)
  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvokerProvider.CreateCacheEntry(ActionInvokerProviderContext context, FilterItem[] cachedFilters)
  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvokerProvider.OnProvidersExecuting(ActionInvokerProviderContext context)
  Microsoft.AspNetCore.Mvc.Internal.ActionInvokerFactory.CreateInvoker(ActionContext actionContext)
  Microsoft.AspNetCore.Mvc.Internal.MvcAttributeRouteHandler+&lt;&gt;c__DisplayClass12_0.&lt;RouteAsync&gt;b__0(HttpContext c)
  Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
  </code></pre>
  
  <p>It seems like the object reference in <code>DocumentationController</code> is never passed in. 
  In ASP.Net you can just simply generate the help pages. Can anyone please explain me how to properly use the <code>ApiExplorer</code> or provide an alternative solution for creating Web API docs?</p>