KestrunHostMapExtensions.AddScalarUiRoute method

Adds a Scalar UI route to the KestrunHost for the specified pattern and OpenAPI endpoint.

public static IEndpointConventionBuilder AddScalarUiRoute(this KestrunHost host, 
    MapRouteOptions options, Uri openApiEndpoint)
parameter description
host The KestrunHost instance.
options The route mapping options.
openApiEndpoint The OpenAPI endpoint URI.

Return Value

An IEndpointConventionBuilder for the mapped route.

Exceptions

exception condition
ArgumentException Thrown when the provided options are invalid.
InvalidOperationException Thrown when the Scalar UI route cannot be created.

See Also