OpenApiRouteHandlerBuilderExtensions.ProducesProblem Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
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
- builder
- RouteHandlerBuilder
- 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.