OpenApiEndpointRouteBuilderExtensions.MapOpenApi Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- endpoints
- IEndpointRouteBuilder
- 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.