OpenApiEndpointConventionBuilderExtensions.WithOpenApi 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.
Overloads
WithOpenApi<TBuilder>(TBuilder) |
Adds an OpenAPI annotation to Metadata associated with the current endpoint. |
WithOpenApi<TBuilder>(TBuilder, Func<OpenApiOperation,OpenApiOperation>) |
Adds an OpenAPI annotation to Metadata associated
with the current endpoint and modifies it with the given |
WithOpenApi<TBuilder>(TBuilder)
Adds an OpenAPI annotation to Metadata associated with the current endpoint.
public static TBuilder WithOpenApi<TBuilder> (this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member WithOpenApi : 'Builder -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function WithOpenApi(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder) As TBuilder
Type Parameters
- TBuilder
Parameters
- builder
- TBuilder
Returns
A IEndpointConventionBuilder that can be used to further customize the endpoint.
Remarks
This method does not integrate with built-in OpenAPI document generation support in ASP.NET Core and is primarily intended for consumption along-side Swashbuckle.AspNetCore.
Applies to
WithOpenApi<TBuilder>(TBuilder, Func<OpenApiOperation,OpenApiOperation>)
Adds an OpenAPI annotation to Metadata associated
with the current endpoint and modifies it with the given configureOperation
.
public static TBuilder WithOpenApi<TBuilder> (this TBuilder builder, Func<Microsoft.OpenApi.Models.OpenApiOperation,Microsoft.OpenApi.Models.OpenApiOperation> configureOperation) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member WithOpenApi : 'Builder * Func<Microsoft.OpenApi.Models.OpenApiOperation, Microsoft.OpenApi.Models.OpenApiOperation> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function WithOpenApi(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, configureOperation As Func(Of OpenApiOperation, OpenApiOperation)) As TBuilder
Type Parameters
- TBuilder
Parameters
- builder
- TBuilder
- configureOperation
- Func<OpenApiOperation,OpenApiOperation>
An Func<T,TResult> that returns a new OpenAPI annotation given a generated operation.
Returns
A IEndpointConventionBuilder that can be used to further customize the endpoint.
Remarks
This method does not integrate with built-in OpenAPI document generation support in ASP.NET Core and is primarily intended for consumption along-side Swashbuckle.AspNetCore.