OpenApiEndpointRouteBuilderExtensions.MapOpenApi Method

Definition

Register an endpoint onto the current application for resolving the OpenAPI document associated with the current application.

public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapOpenApi (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern = "/openapi/{documentName}.json");
static member MapOpenApi : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapOpenApi (endpoints As IEndpointRouteBuilder, Optional pattern As String = "/openapi/{documentName}.json") As IEndpointConventionBuilder

Parameters

pattern
String

The route to register the endpoint on. Must include the 'documentName' route parameter.

Returns

An IEndpointRouteBuilder that can be used to further customize the endpoint.

Applies to