OpenApiRouteHandlerBuilderExtensions.Accepts Method

Definition

Overloads

Accepts(RouteHandlerBuilder, Type, String, String[])

Adds IAcceptsMetadata to Metadata for all endpoints produced by builder.

Accepts(RouteHandlerBuilder, Type, Boolean, String, String[])

Adds IAcceptsMetadata to Metadata for all endpoints produced by builder.

Accepts<TRequest>(RouteHandlerBuilder, String, String[])

Adds IAcceptsMetadata to Metadata for all endpoints produced by builder.

Accepts<TRequest>(RouteHandlerBuilder, Boolean, String, String[])

Adds IAcceptsMetadata to Metadata for all endpoints produced by builder.

Accepts(RouteHandlerBuilder, Type, String, String[])

Adds IAcceptsMetadata to Metadata for all endpoints produced by builder.

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder Accepts (this Microsoft.AspNetCore.Builder.RouteHandlerBuilder builder, Type requestType, string contentType, params string[] additionalContentTypes);
static member Accepts : Microsoft.AspNetCore.Builder.RouteHandlerBuilder * Type * string * string[] -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder
<Extension()>
Public Function Accepts (builder As RouteHandlerBuilder, requestType As Type, contentType As String, ParamArray additionalContentTypes As String()) As RouteHandlerBuilder

Parameters

requestType
Type

The type of the request body.

contentType
String

The request content type that the endpoint accepts.

additionalContentTypes
String[]

The list of additional request content types that the endpoint accepts.

Returns

A RouteHandlerBuilder that can be used to further customize the endpoint.

Applies to

Accepts(RouteHandlerBuilder, Type, Boolean, String, String[])

Adds IAcceptsMetadata to Metadata for all endpoints produced by builder.

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder Accepts (this Microsoft.AspNetCore.Builder.RouteHandlerBuilder builder, Type requestType, bool isOptional, string contentType, params string[] additionalContentTypes);
static member Accepts : Microsoft.AspNetCore.Builder.RouteHandlerBuilder * Type * bool * string * string[] -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder
<Extension()>
Public Function Accepts (builder As RouteHandlerBuilder, requestType As Type, isOptional As Boolean, contentType As String, ParamArray additionalContentTypes As String()) As RouteHandlerBuilder

Parameters

requestType
Type

The type of the request body.

isOptional
Boolean

Sets a value that determines if the request body is optional.

contentType
String

The request content type that the endpoint accepts.

additionalContentTypes
String[]

The list of additional request content types that the endpoint accepts.

Returns

A RouteHandlerBuilder that can be used to further customize the endpoint.

Applies to

Accepts<TRequest>(RouteHandlerBuilder, String, String[])

Adds IAcceptsMetadata to Metadata for all endpoints produced by builder.

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder Accepts<TRequest> (this Microsoft.AspNetCore.Builder.RouteHandlerBuilder builder, string contentType, params string[] additionalContentTypes);
static member Accepts : Microsoft.AspNetCore.Builder.RouteHandlerBuilder * string * string[] -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder
<Extension()>
Public Function Accepts(Of TRequest) (builder As RouteHandlerBuilder, contentType As String, ParamArray additionalContentTypes As String()) As RouteHandlerBuilder

Type Parameters

TRequest

The type of the request body.

Parameters

contentType
String

The request content type that the endpoint accepts.

additionalContentTypes
String[]

The list of additional request content types that the endpoint accepts.

Returns

A RouteHandlerBuilder that can be used to further customize the endpoint.

Applies to

Accepts<TRequest>(RouteHandlerBuilder, Boolean, String, String[])

Adds IAcceptsMetadata to Metadata for all endpoints produced by builder.

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder Accepts<TRequest> (this Microsoft.AspNetCore.Builder.RouteHandlerBuilder builder, bool isOptional, string contentType, params string[] additionalContentTypes);
static member Accepts : Microsoft.AspNetCore.Builder.RouteHandlerBuilder * bool * string * string[] -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder
<Extension()>
Public Function Accepts(Of TRequest) (builder As RouteHandlerBuilder, isOptional As Boolean, contentType As String, ParamArray additionalContentTypes As String()) As RouteHandlerBuilder

Type Parameters

TRequest

The type of the request body.

Parameters

isOptional
Boolean

Sets a value that determines if the request body is optional.

contentType
String

The request content type that the endpoint accepts.

additionalContentTypes
String[]

The list of additional request content types that the endpoint accepts.

Returns

A RouteHandlerBuilder that can be used to further customize the endpoint.

Applies to