SwaggerGenOptionsExtensionsChangeAllResponsesByHttpStatusCodeT(SwaggerGenOptions, HttpStatusCode, String, ResponseExampleOptions, T) - метод
Change all responses by specific http status codes in OpenApi document.
Пространство имён: Tessa.Web.Unchase.Swashbuckle.ExtensionsСборка: Tessa.Web (в Tessa.Web.dll) Версия: 4.0.5
public static SwaggerGenOptions ChangeAllResponsesByHttpStatusCode<T>(
this SwaggerGenOptions swaggerGenOptions,
HttpStatusCode httpStatusCode,
string? responseDescription = null,
ResponseExampleOptions responseExampleOption = ResponseExampleOptions.None,
T responseExample = null
)
where T : class
<ExtensionAttribute>
Public Shared Function ChangeAllResponsesByHttpStatusCode(Of T As Class) (
swaggerGenOptions As SwaggerGenOptions,
httpStatusCode As HttpStatusCode,
Optional responseDescription As String = Nothing,
Optional responseExampleOption As ResponseExampleOptions = ResponseExampleOptions.None,
Optional responseExample As T = Nothing
) As SwaggerGenOptions
public:
[ExtensionAttribute]
generic<typename T>
where T : ref class
static SwaggerGenOptions^ ChangeAllResponsesByHttpStatusCode(
SwaggerGenOptions^ swaggerGenOptions,
HttpStatusCode httpStatusCode,
String^ responseDescription = nullptr,
ResponseExampleOptions responseExampleOption = ResponseExampleOptions::None,
T responseExample = nullptr
)
[<ExtensionAttribute>]
static member ChangeAllResponsesByHttpStatusCode :
swaggerGenOptions : SwaggerGenOptions *
httpStatusCode : HttpStatusCode *
?responseDescription : string *
?responseExampleOption : ResponseExampleOptions *
?responseExample : 'T
(* Defaults:
let _responseDescription = defaultArg responseDescription null
let _responseExampleOption = defaultArg responseExampleOption ResponseExampleOptions.None
let _responseExample = defaultArg responseExample null
*)
-> SwaggerGenOptions when 'T : not struct
- swaggerGenOptions SwaggerGenOptions
- SwaggerGenOptions.
- httpStatusCode HttpStatusCode
- HTTP status code.
- responseDescription String (Optional)
- Response description.
- responseExampleOption ResponseExampleOptions (Optional)
- ResponseExampleOptions.
- responseExample T (Optional)
- New example for response.
- T
- Type of response example.
SwaggerGenOptions
Returns
SwaggerGenOptions.
В Visual Basic и C# этот метод можно вызывать как метод экземпляра для любого объекта типа
SwaggerGenOptions. При вызове метода для экземпляра следует опускать первый параметр. Дополнительные сведения см. в разделе
Методы расширения (Visual Basic) или
Методы расширения (Руководство по программированию в C#).