ApiReferenceServiceExtensions Pennington.DocSite.Api
DI extension methods for registering the API reference package.
Methods
AddApiReference
#public static IServiceCollection AddApiReference(
this IServiceCollection services,
string name = "default",
Action<ApiReferenceRegistrationOptions>? configure = null);Registers one named API-reference tree. Call once per library you want to document. Each call pairs with a matching AddApiMetadataFrom*(name, …) provider registration and publishes its type pages at the configured RoutePrefix.
Parameters
servicesIServiceCollection- Service collection.
namestring (optional)- Registration name. Must match the name used in the provider extension. Defaults to
"default". configureAction<ApiReferenceRegistrationOptions>? (optional)- Optional options configuration; leave null to take all defaults (
/reference/api/prefix).
Returns
IServiceCollectionPennington.DocSite.Api.ApiReferenceServiceExtensions
namespace Pennington.DocSite.Api;
/// DI extension methods for registering the API reference package.
public class ApiReferenceServiceExtensions
{
/// Registers one named API-reference tree. Call once per library you want to document. Each call pairs with a matching AddApiMetadataFrom*(name, …) provider registration and publishes its type pages at the configured RoutePrefix.
public static IServiceCollection AddApiReference(
this IServiceCollection services,
string name = "default",
Action<ApiReferenceRegistrationOptions>? configure = null);
}