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.
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.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for