diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache
index fa6c98e2926..2f92d848892 100644
--- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache
@@ -38,8 +38,21 @@ namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}}
/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
{{/allParams}}
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>>
+ /// Task<ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}>>
Task> {{operationId}}Async({{>OperationSignature}});
+
+ ///
+ /// {{summary}}
+ ///
+ ///
+ /// {{notes}}
+ ///
+ {{#allParams}}
+ /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
+ {{/allParams}}
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}>{{nrt?}}>
+ Task{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}});
{{^-last}}
{{/-last}}
@@ -183,6 +196,26 @@ namespace {{packageName}}.{{apiPackage}}
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// {{summary}} {{notes}}
+ ///
+ {{#allParams}}
+ /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
+ {{/allParams}}
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}})
+ {
+ try
+ {
+ return await {{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// {{summary}} {{notes}}
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
index a74c70f0d0e..acb2bff24d2 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
@@ -38,8 +38,19 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// client model
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<ModelClient?>>
+ /// Task<ApiResponse<ModelClient>>
Task> Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ /// To test special tags
+ ///
+ ///
+ /// To test special tags and operation ID starting with number
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>ModelClient>?>
+ Task?> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -157,6 +168,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test special tags To test special tags and operation ID starting with number
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await Call123TestSpecialTagsAsync(modelClient, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test special tags To test special tags and operation ID starting with number
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs
index cbf9744a155..0865a176236 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs
@@ -37,9 +37,19 @@ namespace Org.OpenAPITools.IApi
///
/// Thrown when fails to make API call
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<FooGetDefaultResponse?>>
+ /// Task<ApiResponse<FooGetDefaultResponse>>
Task> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>FooGetDefaultResponse>?>
+ Task?> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -49,9 +59,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
///
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> GetCountryAsync(string country, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> GetCountryOrDefaultAsync(string country, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Hello
///
@@ -60,8 +81,18 @@ namespace Org.OpenAPITools.IApi
///
/// Thrown when fails to make API call
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<List<Guid>?>>
+ /// Task<ApiResponse<List<Guid>>>
Task>> HelloAsync(System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ /// Hello
+ ///
+ ///
+ /// Hello
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>List<Guid>>?>
+ Task>?> HelloOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -167,6 +198,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FooGetAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
///
///
@@ -266,6 +314,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> GetCountryOrDefaultAsync(string country, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await GetCountryAsync(country, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
///
///
@@ -364,6 +430,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Hello Hello
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task>?> HelloOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await HelloAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Hello Hello
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs
index 45becffd633..6dc5c3ddd60 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs
@@ -37,9 +37,19 @@ namespace Org.OpenAPITools.IApi
///
/// Thrown when fails to make API call
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<HealthCheckResult?>>
+ /// Task<ApiResponse<HealthCheckResult>>
Task> FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Health check endpoint
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>HealthCheckResult>?>
+ Task?> FakeHealthGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -49,9 +59,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// Input boolean as post body (optional)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<bool?>>
+ /// Task<ApiResponse<bool>>
Task> FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// Test serialization of outer boolean types
+ ///
+ /// Input boolean as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>bool>?>
+ Task?> FakeOuterBooleanSerializeOrDefaultAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -61,9 +82,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// Input composite as post body (optional)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<OuterComposite?>>
+ /// Task<ApiResponse<OuterComposite>>
Task> FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// Test serialization of object with outer number type
+ ///
+ /// Input composite as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>OuterComposite>?>
+ Task?> FakeOuterCompositeSerializeOrDefaultAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -73,9 +105,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// Input number as post body (optional)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<decimal?>>
+ /// Task<ApiResponse<decimal>>
Task> FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// Test serialization of outer number types
+ ///
+ /// Input number as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>decimal>?>
+ Task?> FakeOuterNumberSerializeOrDefaultAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -86,9 +129,21 @@ namespace Org.OpenAPITools.IApi
/// Required UUID String
/// Input string as post body (optional)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<string?>>
+ /// Task<ApiResponse<string>>
Task> FakeOuterStringSerializeAsync(Guid requiredStringUuid, string? body = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// Test serialization of outer string types
+ ///
+ /// Required UUID String
+ /// Input string as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>string>?>
+ Task?> FakeOuterStringSerializeOrDefaultAsync(Guid requiredStringUuid, string? body = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Array of Enums
///
@@ -97,9 +152,19 @@ namespace Org.OpenAPITools.IApi
///
/// Thrown when fails to make API call
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<List<OuterEnum>?>>
+ /// Task<ApiResponse<List<OuterEnum>>>
Task>> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Array of Enums
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>List<OuterEnum>>?>
+ Task>?> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -109,9 +174,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
///
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// For this test, the body for this request much reference a schema named `File`.
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -122,9 +198,21 @@ namespace Org.OpenAPITools.IApi
///
///
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// To test \"client\" model
///
@@ -134,9 +222,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// client model
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<ModelClient?>>
+ /// Task<ApiResponse<ModelClient>>
Task> TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// To test \"client\" model
+ ///
+ ///
+ /// To test \"client\" model
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>ModelClient>?>
+ Task?> TestClientModelOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
///
@@ -159,9 +258,33 @@ namespace Org.OpenAPITools.IApi
/// None (optional)
/// None (optional, default to "2010-02-01T10:20:10.111110+01:00")
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> TestEndpointParametersAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ ///
+ ///
+ /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ ///
+ /// None
+ /// None
+ /// None
+ /// None
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional, default to "2010-02-01T10:20:10.111110+01:00")
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> TestEndpointParametersOrDefaultAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// To test enum parameters
///
@@ -178,9 +301,27 @@ namespace Org.OpenAPITools.IApi
/// Query parameter enum test (string) (optional, default to -efg)
/// Form parameter enum test (string) (optional, default to -efg)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> TestEnumParametersAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// To test enum parameters
+ ///
+ ///
+ /// To test enum parameters
+ ///
+ /// Header parameter enum test (string array) (optional)
+ /// Query parameter enum test (string array) (optional)
+ /// Query parameter enum test (double) (optional)
+ /// Query parameter enum test (double) (optional)
+ /// Form parameter enum test (string array) (optional, default to $)
+ /// Header parameter enum test (string) (optional, default to -efg)
+ /// Query parameter enum test (string) (optional, default to -efg)
+ /// Form parameter enum test (string) (optional, default to -efg)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Fake endpoint to test group parameters (optional)
///
@@ -195,9 +336,25 @@ namespace Org.OpenAPITools.IApi
/// String in group parameters (optional)
/// Integer in group parameters (optional)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> TestGroupParametersAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Fake endpoint to test group parameters (optional)
+ ///
+ ///
+ /// Fake endpoint to test group parameters (optional)
+ ///
+ /// Required Boolean in group parameters
+ /// Required String in group parameters
+ /// Required Integer in group parameters
+ /// Boolean in group parameters (optional)
+ /// String in group parameters (optional)
+ /// Integer in group parameters (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// test inline additionalProperties
///
@@ -207,9 +364,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// request body
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// test inline additionalProperties
+ ///
+ ///
+ ///
+ ///
+ /// request body
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// test json serialization of form data
///
@@ -220,9 +388,21 @@ namespace Org.OpenAPITools.IApi
/// field1
/// field2
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// test json serialization of form data
+ ///
+ ///
+ ///
+ ///
+ /// field1
+ /// field2
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> TestJsonFormDataOrDefaultAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -236,8 +416,23 @@ namespace Org.OpenAPITools.IApi
///
///
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ ///
+ ///
+ ///
+ /// To test the collection format in query parameters
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -343,6 +538,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Health check endpoint
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> FakeHealthGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeHealthGetAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Health check endpoint
///
@@ -433,6 +645,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Test serialization of outer boolean types
+ ///
+ /// Input boolean as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> FakeOuterBooleanSerializeOrDefaultAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeOuterBooleanSerializeAsync(body, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Test serialization of outer boolean types
///
@@ -537,6 +767,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Test serialization of object with outer number type
+ ///
+ /// Input composite as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> FakeOuterCompositeSerializeOrDefaultAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeOuterCompositeSerializeAsync(outerComposite, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Test serialization of object with outer number type
///
@@ -641,6 +889,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Test serialization of outer number types
+ ///
+ /// Input number as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> FakeOuterNumberSerializeOrDefaultAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeOuterNumberSerializeAsync(body, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Test serialization of outer number types
///
@@ -757,6 +1023,25 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Test serialization of outer string types
+ ///
+ /// Required UUID String
+ /// Input string as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> FakeOuterStringSerializeOrDefaultAsync(Guid requiredStringUuid, string? body = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeOuterStringSerializeAsync(requiredStringUuid, body, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Test serialization of outer string types
///
@@ -867,6 +1152,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Array of Enums
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task>?> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await GetArrayOfEnumsAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Array of Enums
///
@@ -966,6 +1268,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// For this test, the body for this request much reference a schema named `File`.
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestBodyWithFileSchemaAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// For this test, the body for this request much reference a schema named `File`.
///
@@ -1076,6 +1396,25 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestBodyWithQueryParamsAsync(user, query, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
///
///
@@ -1189,6 +1528,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test \"client\" model To test \"client\" model
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestClientModelOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestClientModelAsync(modelClient, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test \"client\" model To test \"client\" model
///
@@ -1350,6 +1707,37 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ ///
+ /// None
+ /// None
+ /// None
+ /// None
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional, default to "2010-02-01T10:20:10.111110+01:00")
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestEndpointParametersOrDefaultAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestEndpointParametersAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
///
@@ -1553,6 +1941,31 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test enum parameters To test enum parameters
+ ///
+ /// Header parameter enum test (string array) (optional)
+ /// Query parameter enum test (string array) (optional)
+ /// Query parameter enum test (double) (optional)
+ /// Query parameter enum test (double) (optional)
+ /// Form parameter enum test (string array) (optional, default to $)
+ /// Header parameter enum test (string) (optional, default to -efg)
+ /// Query parameter enum test (string) (optional, default to -efg)
+ /// Form parameter enum test (string) (optional, default to -efg)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test enum parameters To test enum parameters
///
@@ -1722,6 +2135,29 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional)
+ ///
+ /// Required Boolean in group parameters
+ /// Required String in group parameters
+ /// Required Integer in group parameters
+ /// Boolean in group parameters (optional)
+ /// String in group parameters (optional)
+ /// Integer in group parameters (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestGroupParametersAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional)
///
@@ -1854,6 +2290,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// test inline additionalProperties
+ ///
+ /// request body
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestInlineAdditionalPropertiesAsync(requestBody, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// test inline additionalProperties
///
@@ -1964,6 +2418,25 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// test json serialization of form data
+ ///
+ /// field1
+ /// field2
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestJsonFormDataOrDefaultAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestJsonFormDataAsync(param, param2, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// test json serialization of form data
///
@@ -2105,6 +2578,28 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test the collection format in query parameters
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test the collection format in query parameters
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs
index 77e53f90065..898fd97f969 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs
@@ -38,8 +38,19 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// client model
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<ModelClient?>>
+ /// Task<ApiResponse<ModelClient>>
Task> TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ /// To test class name in snake case
+ ///
+ ///
+ /// To test class name in snake case
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>ModelClient>?>
+ Task?> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -157,6 +168,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test class name in snake case To test class name in snake case
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestClassnameAsync(modelClient, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test class name in snake case To test class name in snake case
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs
index 30354b30b92..a52bd79bf39 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs
@@ -38,9 +38,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// Pet object that needs to be added to the store
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Add a new pet to the store
+ ///
+ ///
+ ///
+ ///
+ /// Pet object that needs to be added to the store
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> AddPetOrDefaultAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Deletes a pet
///
@@ -51,9 +62,21 @@ namespace Org.OpenAPITools.IApi
/// Pet id to delete
/// (optional)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> DeletePetAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Deletes a pet
+ ///
+ ///
+ ///
+ ///
+ /// Pet id to delete
+ /// (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> DeletePetOrDefaultAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Finds Pets by status
///
@@ -63,9 +86,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// Status values that need to be considered for filter
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<List<Pet>?>>
+ /// Task<ApiResponse<List<Pet>>>
Task>> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Finds Pets by status
+ ///
+ ///
+ /// Multiple status values can be provided with comma separated strings
+ ///
+ /// Status values that need to be considered for filter
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>List<Pet>>?>
+ Task>?> FindPetsByStatusOrDefaultAsync(List status, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Finds Pets by tags
///
@@ -75,9 +109,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// Tags to filter by
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<List<Pet>?>>
+ /// Task<ApiResponse<List<Pet>>>
Task>> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Finds Pets by tags
+ ///
+ ///
+ /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ ///
+ /// Tags to filter by
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>List<Pet>>?>
+ Task>?> FindPetsByTagsOrDefaultAsync(List tags, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Find pet by ID
///
@@ -87,9 +132,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// ID of pet to return
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<Pet?>>
+ /// Task<ApiResponse<Pet>>
Task> GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Find pet by ID
+ ///
+ ///
+ /// Returns a single pet
+ ///
+ /// ID of pet to return
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>Pet>?>
+ Task?> GetPetByIdOrDefaultAsync(long petId, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Update an existing pet
///
@@ -99,9 +155,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// Pet object that needs to be added to the store
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Update an existing pet
+ ///
+ ///
+ ///
+ ///
+ /// Pet object that needs to be added to the store
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> UpdatePetOrDefaultAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Updates a pet in the store with form data
///
@@ -113,9 +180,22 @@ namespace Org.OpenAPITools.IApi
/// Updated name of the pet (optional)
/// Updated status of the pet (optional)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> UpdatePetWithFormAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Updates a pet in the store with form data
+ ///
+ ///
+ ///
+ ///
+ /// ID of pet that needs to be updated
+ /// Updated name of the pet (optional)
+ /// Updated status of the pet (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> UpdatePetWithFormOrDefaultAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// uploads an image
///
@@ -127,9 +207,22 @@ namespace Org.OpenAPITools.IApi
/// file to upload (optional)
/// Additional data to pass to server (optional)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<ApiResponse?>>
+ /// Task<ApiResponse<ApiResponse>>
Task> UploadFileAsync(long petId, System.IO.Stream? file = null, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// uploads an image
+ ///
+ ///
+ ///
+ ///
+ /// ID of pet to update
+ /// file to upload (optional)
+ /// Additional data to pass to server (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>ApiResponse>?>
+ Task?> UploadFileOrDefaultAsync(long petId, System.IO.Stream? file = null, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// uploads an image (required)
///
@@ -141,8 +234,21 @@ namespace Org.OpenAPITools.IApi
/// ID of pet to update
/// Additional data to pass to server (optional)
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<ApiResponse?>>
+ /// Task<ApiResponse<ApiResponse>>
Task> UploadFileWithRequiredFileAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ /// uploads an image (required)
+ ///
+ ///
+ ///
+ ///
+ /// file to upload
+ /// ID of pet to update
+ /// Additional data to pass to server (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>ApiResponse>?>
+ Task?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -260,6 +366,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Add a new pet to the store
+ ///
+ /// Pet object that needs to be added to the store
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> AddPetOrDefaultAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await AddPetAsync(pet, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Add a new pet to the store
///
@@ -392,6 +516,25 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Deletes a pet
+ ///
+ /// Pet id to delete
+ /// (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> DeletePetOrDefaultAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await DeletePetAsync(petId, apiKey, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Deletes a pet
///
@@ -501,6 +644,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Finds Pets by status Multiple status values can be provided with comma separated strings
+ ///
+ /// Status values that need to be considered for filter
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task>?> FindPetsByStatusOrDefaultAsync(List status, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FindPetsByStatusAsync(status, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Finds Pets by status Multiple status values can be provided with comma separated strings
///
@@ -632,6 +793,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ ///
+ /// Tags to filter by
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task>?> FindPetsByTagsOrDefaultAsync(List tags, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FindPetsByTagsAsync(tags, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
///
@@ -763,6 +942,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Find pet by ID Returns a single pet
+ ///
+ /// ID of pet to return
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> GetPetByIdOrDefaultAsync(long petId, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await GetPetByIdAsync(petId, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Find pet by ID Returns a single pet
///
@@ -874,6 +1071,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Update an existing pet
+ ///
+ /// Pet object that needs to be added to the store
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> UpdatePetOrDefaultAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await UpdatePetAsync(pet, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Update an existing pet
///
@@ -1009,6 +1224,26 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Updates a pet in the store with form data
+ ///
+ /// ID of pet that needs to be updated
+ /// Updated name of the pet (optional)
+ /// Updated status of the pet (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> UpdatePetWithFormOrDefaultAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await UpdatePetWithFormAsync(petId, name, status, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Updates a pet in the store with form data
///
@@ -1144,6 +1379,26 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// uploads an image
+ ///
+ /// ID of pet to update
+ /// file to upload (optional)
+ /// Additional data to pass to server (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> UploadFileOrDefaultAsync(long petId, System.IO.Stream? file = null, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await UploadFileAsync(petId, file, additionalMetadata, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// uploads an image
///
@@ -1291,6 +1546,26 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// uploads an image (required)
+ ///
+ /// file to upload
+ /// ID of pet to update
+ /// Additional data to pass to server (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await UploadFileWithRequiredFileAsync(requiredFile, petId, additionalMetadata, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// uploads an image (required)
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs
index 3f934841e9d..c3dd3e58a6c 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -38,9 +38,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// ID of the order that needs to be deleted
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Delete purchase order by ID
+ ///
+ ///
+ /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ ///
+ /// ID of the order that needs to be deleted
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> DeleteOrderOrDefaultAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Returns pet inventories by status
///
@@ -49,9 +60,19 @@ namespace Org.OpenAPITools.IApi
///
/// Thrown when fails to make API call
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<Dictionary<string, int>?>>
+ /// Task<ApiResponse<Dictionary<string, int>>>
Task>> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Returns pet inventories by status
+ ///
+ ///
+ /// Returns a map of status codes to quantities
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>Dictionary<string, int>>?>
+ Task>?> GetInventoryOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Find purchase order by ID
///
@@ -61,9 +82,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// ID of pet that needs to be fetched
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<Order?>>
+ /// Task<ApiResponse<Order>>
Task> GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Find purchase order by ID
+ ///
+ ///
+ /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
+ ///
+ /// ID of pet that needs to be fetched
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>Order>?>
+ Task?> GetOrderByIdOrDefaultAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Place an order for a pet
///
@@ -73,8 +105,19 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// order placed for purchasing the pet
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<Order?>>
+ /// Task<ApiResponse<Order>>
Task> PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ /// Place an order for a pet
+ ///
+ ///
+ ///
+ ///
+ /// order placed for purchasing the pet
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>Order>?>
+ Task?> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -192,6 +235,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ ///
+ /// ID of the order that needs to be deleted
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> DeleteOrderOrDefaultAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await DeleteOrderAsync(orderId, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
///
@@ -271,6 +332,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Returns pet inventories by status Returns a map of status codes to quantities
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task>?> GetInventoryOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await GetInventoryAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Returns pet inventories by status Returns a map of status codes to quantities
///
@@ -380,6 +458,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
+ ///
+ /// ID of pet that needs to be fetched
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> GetOrderByIdOrDefaultAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await GetOrderByIdAsync(orderId, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
///
@@ -481,6 +577,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Place an order for a pet
+ ///
+ /// order placed for purchasing the pet
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await PlaceOrderAsync(order, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Place an order for a pet
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs
index 50b6ae47974..b8f84ef7cce 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs
@@ -38,9 +38,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// Created user object
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Create user
+ ///
+ ///
+ /// This can only be done by the logged in user.
+ ///
+ /// Created user object
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> CreateUserOrDefaultAsync(User user, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Creates list of users with given input array
///
@@ -50,9 +61,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// List of user object
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Creates list of users with given input array
+ ///
+ ///
+ ///
+ ///
+ /// List of user object
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> CreateUsersWithArrayInputOrDefaultAsync(List user, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Creates list of users with given input array
///
@@ -62,9 +84,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// List of user object
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Creates list of users with given input array
+ ///
+ ///
+ ///
+ ///
+ /// List of user object
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> CreateUsersWithListInputOrDefaultAsync(List user, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Delete user
///
@@ -74,9 +107,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// The name that needs to be deleted
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Delete user
+ ///
+ ///
+ /// This can only be done by the logged in user.
+ ///
+ /// The name that needs to be deleted
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> DeleteUserOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Get user by user name
///
@@ -86,9 +130,20 @@ namespace Org.OpenAPITools.IApi
/// Thrown when fails to make API call
/// The name that needs to be fetched. Use user1 for testing.
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<User?>>
+ /// Task<ApiResponse<User>>
Task> GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Get user by user name
+ ///
+ ///
+ ///
+ ///
+ /// The name that needs to be fetched. Use user1 for testing.
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>User>?>
+ Task?> GetUserByNameOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Logs user into the system
///
@@ -99,9 +154,21 @@ namespace Org.OpenAPITools.IApi
/// The user name for login
/// The password for login in clear text
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<string?>>
+ /// Task<ApiResponse<string>>
Task> LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Logs user into the system
+ ///
+ ///
+ ///
+ ///
+ /// The user name for login
+ /// The password for login in clear text
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>string>?>
+ Task?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Logs out current logged in user session
///
@@ -110,9 +177,19 @@ namespace Org.OpenAPITools.IApi
///
/// Thrown when fails to make API call
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Logs out current logged in user session
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> LogoutUserOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Updated user
///
@@ -123,8 +200,20 @@ namespace Org.OpenAPITools.IApi
/// Updated user object
/// name that need to be deleted
/// Cancellation Token to cancel the request.
- /// Task<ApiResponse<object?>>
+ /// Task<ApiResponse<object>>
Task> UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ /// Updated user
+ ///
+ ///
+ /// This can only be done by the logged in user.
+ ///
+ /// Updated user object
+ /// name that need to be deleted
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>?>
+ Task?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -242,6 +331,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Create user This can only be done by the logged in user.
+ ///
+ /// Created user object
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> CreateUserOrDefaultAsync(User user, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await CreateUserAsync(user, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Create user This can only be done by the logged in user.
///
@@ -346,6 +453,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Creates list of users with given input array
+ ///
+ /// List of user object
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> CreateUsersWithArrayInputOrDefaultAsync(List user, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await CreateUsersWithArrayInputAsync(user, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Creates list of users with given input array
///
@@ -450,6 +575,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Creates list of users with given input array
+ ///
+ /// List of user object
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> CreateUsersWithListInputOrDefaultAsync(List user, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await CreateUsersWithListInputAsync(user, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Creates list of users with given input array
///
@@ -554,6 +697,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Delete user This can only be done by the logged in user.
+ ///
+ /// The name that needs to be deleted
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> DeleteUserOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await DeleteUserAsync(username, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Delete user This can only be done by the logged in user.
///
@@ -645,6 +806,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Get user by user name
+ ///
+ /// The name that needs to be fetched. Use user1 for testing.
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> GetUserByNameOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await GetUserByNameAsync(username, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Get user by user name
///
@@ -752,6 +931,25 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Logs user into the system
+ ///
+ /// The user name for login
+ /// The password for login in clear text
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Logs user into the system
///
@@ -851,6 +1049,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Logs out current logged in user session
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> LogoutUserOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await LogoutUserAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Logs out current logged in user session
///
@@ -947,6 +1162,25 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Updated user This can only be done by the logged in user.
+ ///
+ /// Updated user object
+ /// name that need to be deleted
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Updated user This can only be done by the logged in user.
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
index 4e0d97c65c9..2e1ff89ea1f 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
@@ -38,6 +38,17 @@ namespace Org.OpenAPITools.IApi
/// Cancellation Token to cancel the request.
/// Task<ApiResponse<ModelClient>>
Task> Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ /// To test special tags
+ ///
+ ///
+ /// To test special tags and operation ID starting with number
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>ModelClient>>
+ Task> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -155,6 +166,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test special tags To test special tags and operation ID starting with number
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await Call123TestSpecialTagsAsync(modelClient, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test special tags To test special tags and operation ID starting with number
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs
index 03430302db9..ce601f58665 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs
@@ -38,6 +38,16 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<FooGetDefaultResponse>>
Task> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>FooGetDefaultResponse>>
+ Task> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -50,6 +60,17 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<object>>
Task> GetCountryAsync(string country, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> GetCountryOrDefaultAsync(string country, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Hello
///
@@ -60,6 +81,16 @@ namespace Org.OpenAPITools.IApi
/// Cancellation Token to cancel the request.
/// Task<ApiResponse<List<Guid>>>
Task>> HelloAsync(System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ /// Hello
+ ///
+ ///
+ /// Hello
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>List<Guid>>>
+ Task>> HelloOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -165,6 +196,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FooGetAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
///
///
@@ -264,6 +312,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> GetCountryOrDefaultAsync(string country, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await GetCountryAsync(country, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
///
///
@@ -362,6 +428,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Hello Hello
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task>> HelloOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await HelloAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Hello Hello
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs
index ce366273812..d4f93c9ec45 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs
@@ -38,6 +38,16 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<HealthCheckResult>>
Task> FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Health check endpoint
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>HealthCheckResult>>
+ Task> FakeHealthGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -50,6 +60,17 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<bool>>
Task> FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// Test serialization of outer boolean types
+ ///
+ /// Input boolean as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>bool>>
+ Task> FakeOuterBooleanSerializeOrDefaultAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -62,6 +83,17 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<OuterComposite>>
Task> FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// Test serialization of object with outer number type
+ ///
+ /// Input composite as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>OuterComposite>>
+ Task> FakeOuterCompositeSerializeOrDefaultAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -74,6 +106,17 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<decimal>>
Task> FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// Test serialization of outer number types
+ ///
+ /// Input number as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>decimal>>
+ Task> FakeOuterNumberSerializeOrDefaultAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -87,6 +130,18 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<string>>
Task> FakeOuterStringSerializeAsync(Guid requiredStringUuid, string body = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// Test serialization of outer string types
+ ///
+ /// Required UUID String
+ /// Input string as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>string>>
+ Task> FakeOuterStringSerializeOrDefaultAsync(Guid requiredStringUuid, string body = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Array of Enums
///
@@ -98,6 +153,16 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<List<OuterEnum>>>
Task>> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Array of Enums
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>List<OuterEnum>>>
+ Task>> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -110,6 +175,17 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<object>>
Task> TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ /// For this test, the body for this request much reference a schema named `File`.
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -123,6 +199,18 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<object>>
Task> TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// To test \"client\" model
///
@@ -135,6 +223,17 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<ModelClient>>
Task> TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// To test \"client\" model
+ ///
+ ///
+ /// To test \"client\" model
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>ModelClient>>
+ Task> TestClientModelOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
///
@@ -160,6 +259,30 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<object>>
Task> TestEndpointParametersAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ ///
+ ///
+ /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ ///
+ /// None
+ /// None
+ /// None
+ /// None
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional, default to "2010-02-01T10:20:10.111110+01:00")
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> TestEndpointParametersOrDefaultAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// To test enum parameters
///
@@ -179,6 +302,24 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<object>>
Task> TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// To test enum parameters
+ ///
+ ///
+ /// To test enum parameters
+ ///
+ /// Header parameter enum test (string array) (optional)
+ /// Query parameter enum test (string array) (optional)
+ /// Query parameter enum test (double) (optional)
+ /// Query parameter enum test (double) (optional)
+ /// Form parameter enum test (string array) (optional, default to $)
+ /// Header parameter enum test (string) (optional, default to -efg)
+ /// Query parameter enum test (string) (optional, default to -efg)
+ /// Form parameter enum test (string) (optional, default to -efg)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// Fake endpoint to test group parameters (optional)
///
@@ -196,6 +337,22 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<object>>
Task> TestGroupParametersAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Fake endpoint to test group parameters (optional)
+ ///
+ ///
+ /// Fake endpoint to test group parameters (optional)
+ ///
+ /// Required Boolean in group parameters
+ /// Required String in group parameters
+ /// Required Integer in group parameters
+ /// Boolean in group parameters (optional)
+ /// String in group parameters (optional)
+ /// Integer in group parameters (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// test inline additionalProperties
///
@@ -208,6 +365,17 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<object>>
Task> TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// test inline additionalProperties
+ ///
+ ///
+ ///
+ ///
+ /// request body
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null);
+
///
/// test json serialization of form data
///
@@ -221,6 +389,18 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<object>>
Task> TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// test json serialization of form data
+ ///
+ ///
+ ///
+ ///
+ /// field1
+ /// field2
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> TestJsonFormDataOrDefaultAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null);
+
///
///
///
@@ -236,6 +416,21 @@ namespace Org.OpenAPITools.IApi
/// Cancellation Token to cancel the request.
/// Task<ApiResponse<object>>
Task> TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ ///
+ ///
+ ///
+ /// To test the collection format in query parameters
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -341,6 +536,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Health check endpoint
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> FakeHealthGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeHealthGetAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Health check endpoint
///
@@ -431,6 +643,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Test serialization of outer boolean types
+ ///
+ /// Input boolean as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> FakeOuterBooleanSerializeOrDefaultAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeOuterBooleanSerializeAsync(body, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Test serialization of outer boolean types
///
@@ -535,6 +765,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Test serialization of object with outer number type
+ ///
+ /// Input composite as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> FakeOuterCompositeSerializeOrDefaultAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeOuterCompositeSerializeAsync(outerComposite, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Test serialization of object with outer number type
///
@@ -639,6 +887,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Test serialization of outer number types
+ ///
+ /// Input number as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> FakeOuterNumberSerializeOrDefaultAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeOuterNumberSerializeAsync(body, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Test serialization of outer number types
///
@@ -755,6 +1021,25 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Test serialization of outer string types
+ ///
+ /// Required UUID String
+ /// Input string as post body (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> FakeOuterStringSerializeOrDefaultAsync(Guid requiredStringUuid, string body = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await FakeOuterStringSerializeAsync(requiredStringUuid, body, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Test serialization of outer string types
///
@@ -865,6 +1150,23 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Array of Enums
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task>> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await GetArrayOfEnumsAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Array of Enums
///
@@ -964,6 +1266,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// For this test, the body for this request much reference a schema named `File`.
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestBodyWithFileSchemaAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// For this test, the body for this request much reference a schema named `File`.
///
@@ -1074,6 +1394,25 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestBodyWithQueryParamsAsync(user, query, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
///
///
@@ -1187,6 +1526,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test \"client\" model To test \"client\" model
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestClientModelOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestClientModelAsync(modelClient, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test \"client\" model To test \"client\" model
///
@@ -1348,6 +1705,37 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ ///
+ /// None
+ /// None
+ /// None
+ /// None
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional)
+ /// None (optional, default to "2010-02-01T10:20:10.111110+01:00")
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestEndpointParametersOrDefaultAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestEndpointParametersAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
///
@@ -1551,6 +1939,31 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test enum parameters To test enum parameters
+ ///
+ /// Header parameter enum test (string array) (optional)
+ /// Query parameter enum test (string array) (optional)
+ /// Query parameter enum test (double) (optional)
+ /// Query parameter enum test (double) (optional)
+ /// Form parameter enum test (string array) (optional, default to $)
+ /// Header parameter enum test (string) (optional, default to -efg)
+ /// Query parameter enum test (string) (optional, default to -efg)
+ /// Form parameter enum test (string) (optional, default to -efg)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test enum parameters To test enum parameters
///
@@ -1720,6 +2133,29 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional)
+ ///
+ /// Required Boolean in group parameters
+ /// Required String in group parameters
+ /// Required Integer in group parameters
+ /// Boolean in group parameters (optional)
+ /// String in group parameters (optional)
+ /// Integer in group parameters (optional)
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestGroupParametersAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional)
///
@@ -1852,6 +2288,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// test inline additionalProperties
+ ///
+ /// request body
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestInlineAdditionalPropertiesAsync(requestBody, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// test inline additionalProperties
///
@@ -1962,6 +2416,25 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// test json serialization of form data
+ ///
+ /// field1
+ /// field2
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestJsonFormDataOrDefaultAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestJsonFormDataAsync(param, param2, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// test json serialization of form data
///
@@ -2103,6 +2576,28 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test the collection format in query parameters
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test the collection format in query parameters
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs
index 640f5132931..ec5a4463991 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs
@@ -38,6 +38,17 @@ namespace Org.OpenAPITools.IApi
/// Cancellation Token to cancel the request.
/// Task<ApiResponse<ModelClient>>
Task> TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ /// To test class name in snake case
+ ///
+ ///
+ /// To test class name in snake case
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>ModelClient>>
+ Task> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
}
}
@@ -155,6 +166,24 @@ namespace Org.OpenAPITools.Api
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
+ ///
+ /// To test class name in snake case To test class name in snake case
+ ///
+ /// client model
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ try
+ {
+ return await TestClassnameAsync(modelClient, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
///
/// To test class name in snake case To test class name in snake case
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs
index 54ab707daad..1ff2e4c20d4 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs
@@ -39,6 +39,17 @@ namespace Org.OpenAPITools.IApi
/// Task<ApiResponse<object>>
Task> AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null);
+ ///
+ /// Add a new pet to the store
+ ///
+ ///
+ ///
+ ///
+ /// Pet object that needs to be added to the store
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse>object>>
+ Task> AddPetOrDefaultAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null);
+
///