KestrunHostMapExtensions.AddSwaggerUiRoute method
Adds a Swagger UI route to the KestrunHost for the specified pattern and OpenAPI endpoint.
public static IEndpointConventionBuilder AddSwaggerUiRoute(this KestrunHost host,
MapRouteOptions options, Uri openApiEndpoint)
| parameter | description |
|---|---|
| host | The KestrunHost instance. |
| options | The MapRouteOptions containing route configuration. |
| openApiEndpoint | The URI of the OpenAPI endpoint. |
Return Value
An IEndpointConventionBuilder for further configuration.
Exceptions
| exception | condition |
|---|---|
| ArgumentException | Thrown when the provided options are invalid. |
| InvalidOperationException | Thrown when the Swagger UI route cannot be created. |
See Also
- class KestrunHost
- class MapRouteOptions
- class KestrunHostMapExtensions
- namespace Kestrun.Hosting