Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

OpenApiOptions.AddDocumentTransformer Method

Definition

Namespace:
Microsoft.AspNetCore.OpenApi
Assembly:
Microsoft.AspNetCore.OpenApi.dll
Package:
Microsoft.AspNetCore.OpenApi v10.0.0
Package:
Microsoft.AspNetCore.OpenApi v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.OpenApi v9.0.8

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.

Overloads

Name Description
AddDocumentTransformer(IOpenApiDocumentTransformer)

Registers a given instance of IOpenApiDocumentTransformer on the current OpenApiOptions instance.

AddDocumentTransformer(Func<OpenApiDocument,OpenApiDocumentTransformerContext,CancellationToken,Task>)

Registers a given delegate as a document transformer on the current OpenApiOptions instance.

AddDocumentTransformer(Func<OpenApiDocument,OpenApiDocumentTransformerContext,CancellationToken,Task>)

Registers a given delegate as a document transformer on the current OpenApiOptions instance.

AddDocumentTransformer<TTransformerType>()

Registers a new document transformer on the current OpenApiOptions instance.

AddDocumentTransformer(IOpenApiDocumentTransformer)

Source:
OpenApiOptions.cs
Source:
OpenApiOptions.cs
Source:
OpenApiOptions.cs

Registers a given instance of IOpenApiDocumentTransformer on the current OpenApiOptions instance.

public Microsoft.AspNetCore.OpenApi.OpenApiOptions AddDocumentTransformer(Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer transformer);
member this.AddDocumentTransformer : Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer -> Microsoft.AspNetCore.OpenApi.OpenApiOptions
Public Function AddDocumentTransformer (transformer As IOpenApiDocumentTransformer) As OpenApiOptions

Parameters

transformer
IOpenApiDocumentTransformer

The IOpenApiDocumentTransformer instance to use.

Returns

The OpenApiOptions instance for further customization.

Applies to

AddDocumentTransformer(Func<OpenApiDocument,OpenApiDocumentTransformerContext,CancellationToken,Task>)

Source:
OpenApiOptions.cs

Registers a given delegate as a document transformer on the current OpenApiOptions instance.

public Microsoft.AspNetCore.OpenApi.OpenApiOptions AddDocumentTransformer(Func<Microsoft.OpenApi.Models.OpenApiDocument,Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext,System.Threading.CancellationToken,System.Threading.Tasks.Task> transformer);
member this.AddDocumentTransformer : Func<Microsoft.OpenApi.Models.OpenApiDocument, Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext, System.Threading.CancellationToken, System.Threading.Tasks.Task> -> Microsoft.AspNetCore.OpenApi.OpenApiOptions
Public Function AddDocumentTransformer (transformer As Func(Of OpenApiDocument, OpenApiDocumentTransformerContext, CancellationToken, Task)) As OpenApiOptions

Parameters

transformer
Func<Microsoft.OpenApi.Models.OpenApiDocument,OpenApiDocumentTransformerContext,CancellationToken,Task>

The delegate representing the document transformer.

Returns

The OpenApiOptions instance for further customization.

Applies to

AddDocumentTransformer(Func<OpenApiDocument,OpenApiDocumentTransformerContext,CancellationToken,Task>)

Source:
OpenApiOptions.cs
Source:
OpenApiOptions.cs

Registers a given delegate as a document transformer on the current OpenApiOptions instance.

public Microsoft.AspNetCore.OpenApi.OpenApiOptions AddDocumentTransformer(Func<Microsoft.OpenApi.OpenApiDocument,Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext,System.Threading.CancellationToken,System.Threading.Tasks.Task> transformer);
member this.AddDocumentTransformer : Func<Microsoft.OpenApi.OpenApiDocument, Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext, System.Threading.CancellationToken, System.Threading.Tasks.Task> -> Microsoft.AspNetCore.OpenApi.OpenApiOptions
Public Function AddDocumentTransformer (transformer As Func(Of OpenApiDocument, OpenApiDocumentTransformerContext, CancellationToken, Task)) As OpenApiOptions

Parameters

transformer
Func<OpenApiDocument,OpenApiDocumentTransformerContext,CancellationToken,Task>

The delegate representing the document transformer.

Returns

The OpenApiOptions instance for further customization.

Applies to

AddDocumentTransformer<TTransformerType>()

Source:
OpenApiOptions.cs
Source:
OpenApiOptions.cs
Source:
OpenApiOptions.cs

Registers a new document transformer on the current OpenApiOptions instance.

public Microsoft.AspNetCore.OpenApi.OpenApiOptions AddDocumentTransformer<TTransformerType>() where TTransformerType : Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer;
member this.AddDocumentTransformer : unit -> Microsoft.AspNetCore.OpenApi.OpenApiOptions (requires 'ransformerType :> Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer)
Public Function AddDocumentTransformer(Of TTransformerType As IOpenApiDocumentTransformer) () As OpenApiOptions

Type Parameters

TTransformerType

The type of the IOpenApiDocumentTransformer to instantiate.

Returns

The OpenApiOptions instance for further customization.

Applies to


Feedback

Was this page helpful?