Method
ApiDocumentationBuilderExtensions.UseApiDocumentation
UseApiDocumentation(HttpServerHostContextBuilder, ApiGenerationContext, string, IApiDocumentationExporter?) #
Configures the application to expose generated API documentation at the specified router path.
public static HttpServerHostContextBuilder UseApiDocumentation(this HttpServerHostContextBuilder builder, ApiGenerationContext context, string routerPath = "/api/docs", IApiDocumentationExporter? exporter = null)Parameters #
builder HttpServerHostContextBuilder
The HttpServerHostContextBuilder to configure.
context ApiGenerationContext
The ApiGenerationContext used to generate the documentation.
routerPath string
The route at which the documentation will be served. Defaults to “/api/docs”.
exporter IApiDocumentationExporter?
The IApiDocumentationExporter used to export the documentation content.
If null, a default OpenApiExporter is used.
Returns #
HttpServerHostContextBuilder
The same HttpServerHostContextBuilder instance for method chaining.
UseApiDocumentation(HttpServerHostContextBuilder) #
Configures the application to expose generated API documentation at the default router path “/api/docs” using an empty ApiGenerationContext.
public static HttpServerHostContextBuilder UseApiDocumentation(this HttpServerHostContextBuilder builder)Parameters #
builder HttpServerHostContextBuilder
The HttpServerHostContextBuilder to configure.
Returns #
HttpServerHostContextBuilder
The same HttpServerHostContextBuilder instance for method chaining.