Aracılığıyla paylaş


OpenApiRouteHandlerBuilderExtensions.ProducesProblem Yöntem

Tanım

tarafından builderüretilen tüm uç noktalar için türüne Metadata sahip bir IProducesResponseTypeMetadataProblemDetails ekler.

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder ProducesProblem (this Microsoft.AspNetCore.Builder.RouteHandlerBuilder builder, int statusCode, string? contentType = default);
static member ProducesProblem : Microsoft.AspNetCore.Builder.RouteHandlerBuilder * int * string -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder
<Extension()>
Public Function ProducesProblem (builder As RouteHandlerBuilder, statusCode As Integer, Optional contentType As String = Nothing) As RouteHandlerBuilder

Parametreler

statusCode
Int32

Yanıt durum kodu.

contentType
String

Yanıt içerik türü. Varsayılan olarak "application/problem+json" kullanılır.

Döndürülenler

RouteHandlerBuilder Uç noktayı daha fazla özelleştirmek için kullanılabilecek bir.

Şunlara uygulanır