OpenApiEndpointConventionBuilderExtensions.AddOpenApiOperationTransformer<TBuilder> 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.
Adds an OpenAPI operation transformer to the Metadata associated with the current endpoint.
public static TBuilder AddOpenApiOperationTransformer<TBuilder>(this TBuilder builder, Func<Microsoft.OpenApi.OpenApiOperation,Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext,System.Threading.CancellationToken,System.Threading.Tasks.Task> transformer) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member AddOpenApiOperationTransformer : 'Builder * Func<Microsoft.OpenApi.OpenApiOperation, Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext, System.Threading.CancellationToken, System.Threading.Tasks.Task> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function AddOpenApiOperationTransformer(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, transformer As Func(Of OpenApiOperation, OpenApiOperationTransformerContext, CancellationToken, Task)) As TBuilder
Type Parameters
- TBuilder
Parameters
- builder
- TBuilder
- transformer
- Func<Microsoft.OpenApi.OpenApiOperation,OpenApiOperationTransformerContext,CancellationToken,Task>
The Func<T1,T2,T3,TResult> that modifies the operation in the Microsoft.OpenApi.OpenApiDocument.
Returns
A IEndpointConventionBuilder that can be used to further customize the endpoint.