From 35e1e992d1836513479d8fdc91b964c84c07bc7e Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Mon, 23 Mar 2020 14:48:38 -0400 Subject: [PATCH 1/9] Fixed valuetype parameters and discriminator deserialization - Made non-required valuetypes nullable, and flagged required valuetypes as "x-csharp-value-type" - Made sure to camelCase discriminator property names in Subtype converter --- .../codegen/languages/CSharpClientCodegen.java | 12 ++++++++++++ .../src/main/resources/csharp/modelGeneric.mustache | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 6c2dcc7a714f..a12d712c3ffa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -661,6 +661,14 @@ public void postProcessParameter(CodegenParameter parameter) { postProcessPattern(parameter.pattern, parameter.vendorExtensions); postProcessEmitDefaultValue(parameter.vendorExtensions); super.postProcessParameter(parameter); + + if (nullableType.contains(parameter.dataType)) { + if (!parameter.required) { //optional + parameter.dataType = parameter.dataType + "?"; + } else { + parameter.vendorExtensions.put("x-csharp-value-type", true); + } + } } @Override @@ -668,6 +676,10 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert postProcessPattern(property.pattern, property.vendorExtensions); postProcessEmitDefaultValue(property.vendorExtensions); super.postProcessModelProperty(model, property); + + if (!property.isContainer && (nullableType.contains(property.dataType) || property.isEnum)) { + property.vendorExtensions.put("x-csharp-value-type", true); + } } /* diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 6a9be0147f81..0b40840d5e63 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -3,7 +3,7 @@ /// [DataContract] {{#discriminator}} - [JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")]{{#children}} + [JsonConverter(typeof(JsonSubtypes), "{{#lambda.camelcase_param}}{{{discriminatorName}}}{{/lambda.camelcase_param}}")]{{#children}} [JsonSubtypes.KnownSubType(typeof({{classname}}), "{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}")]{{/children}} {{/discriminator}} {{#generatePropertyChanged}} From 3afe020abb5bbc525b171fa78f50b3b22e3e44bc Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Mon, 23 Mar 2020 15:08:49 -0400 Subject: [PATCH 2/9] Ran pet store sample script --- .../csharp/OpenAPIClient/docs/FakeApi.md | 62 +++++++------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 80 +++++++++---------- .../src/Org.OpenAPITools/Model/Animal.cs | 2 +- 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index edffb58d3c79..661c2cba6ab3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -97,7 +97,7 @@ No authorization required ## FakeOuterBooleanSerialize -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (bool? body = null) @@ -120,7 +120,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool | Input boolean as post body (optional) + var body = true; // bool? | Input boolean as post body (optional) try { @@ -143,7 +143,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **bool**| Input boolean as post body | [optional] + **body** | **bool?**| Input boolean as post body | [optional] ### Return type @@ -245,7 +245,7 @@ No authorization required ## FakeOuterNumberSerialize -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (decimal? body = null) @@ -268,7 +268,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal | Input number as post body (optional) + var body = 8.14; // decimal? | Input number as post body (optional) try { @@ -291,7 +291,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **decimal**| Input number as post body | [optional] + **body** | **decimal?**| Input number as post body | [optional] ### Return type @@ -614,7 +614,7 @@ No authorization required ## TestEndpointParameters -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -645,14 +645,14 @@ namespace Example var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789; // long | None (optional) - var _float = 3.4F; // float | None (optional) + var integer = 56; // int? | None (optional) + var int32 = 56; // int? | None (optional) + var int64 = 789; // long? | None (optional) + var _float = 3.4F; // float? | None (optional) var _string = _string_example; // string | None (optional) var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None (optional) + var date = 2013-10-20; // DateTime? | None (optional) + var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) var password = password_example; // string | None (optional) var callback = callback_example; // string | None (optional) @@ -681,14 +681,14 @@ Name | Type | Description | Notes **_double** | **double**| None | **patternWithoutDelimiter** | **string**| None | **_byte** | **byte[]**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **long**| None | [optional] - **_float** | **float**| None | [optional] + **integer** | **int?**| None | [optional] + **int32** | **int?**| None | [optional] + **int64** | **long?**| None | [optional] + **_float** | **float?**| None | [optional] **_string** | **string**| None | [optional] **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime**| None | [optional] - **dateTime** | **DateTime**| None | [optional] + **date** | **DateTime?**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] **callback** | **string**| None | [optional] @@ -719,7 +719,7 @@ void (empty response body) ## TestEnumParameters -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -746,8 +746,8 @@ namespace Example var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double | Query parameter enum test (double) (optional) + var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -776,8 +776,8 @@ Name | Type | Description | Notes **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] @@ -808,7 +808,7 @@ No authorization required ## TestGroupParameters -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -834,9 +834,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) - var booleanGroup = true; // bool | Boolean in group parameters (optional) - var int64Group = 789; // long | Integer in group parameters (optional) + var stringGroup = 56; // int? | String in group parameters (optional) + var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var int64Group = 789; // long? | Integer in group parameters (optional) try { @@ -862,9 +862,9 @@ Name | Type | Description | Notes **requiredStringGroup** | **int**| Required String in group parameters | **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int**| String in group parameters | [optional] - **booleanGroup** | **bool**| Boolean in group parameters | [optional] - **int64Group** | **long**| Integer in group parameters | [optional] + **stringGroup** | **int?**| String in group parameters | [optional] + **booleanGroup** | **bool?**| Boolean in group parameters | [optional] + **int64Group** | **long?**| Integer in group parameters | [optional] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index e7f144292bb9..d739d62f0a98 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -54,7 +54,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize (bool body = default(bool)); + bool FakeOuterBooleanSerialize (bool? body = default(bool?)); /// /// @@ -65,7 +65,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -96,7 +96,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize (decimal body = default(decimal)); + decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); /// /// @@ -107,7 +107,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -216,7 +216,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -257,7 +257,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -275,7 +275,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -290,7 +290,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -306,7 +306,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -412,7 +412,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)); /// /// @@ -423,7 +423,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -454,7 +454,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)); /// /// @@ -465,7 +465,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -574,7 +574,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -598,7 +598,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -615,7 +615,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -633,7 +633,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -648,7 +648,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -664,7 +664,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -1010,7 +1010,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize (bool body = default(bool)) + public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) { ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1022,7 +1022,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)) + public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "/fake/outer/boolean"; @@ -1080,7 +1080,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)) { ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1093,7 +1093,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "/fake/outer/boolean"; @@ -1292,7 +1292,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize (decimal body = default(decimal)) + public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) { ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1304,7 +1304,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)) + public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "/fake/outer/number"; @@ -1362,7 +1362,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)) { ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1375,7 +1375,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "/fake/outer/number"; @@ -2038,7 +2038,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2062,7 +2062,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2157,7 +2157,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -2182,7 +2182,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2271,7 +2271,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2289,7 +2289,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "/fake"; @@ -2354,7 +2354,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { await TestEnumParametersAsyncWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -2373,7 +2373,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "/fake"; @@ -2436,7 +2436,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2452,7 +2452,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2521,7 +2521,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { await TestGroupParametersAsyncWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); @@ -2538,7 +2538,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs index eb9b58f20753..832fd0e36eb8 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs @@ -29,7 +29,7 @@ namespace Org.OpenAPITools.Model /// Animal /// [DataContract] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] + [JsonConverter(typeof(JsonSubtypes), "className")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] From c735e51115e3424efd3e7975ef4ff2fee43c8907 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Mon, 30 Mar 2020 15:06:57 -0400 Subject: [PATCH 3/9] Ensure that readWriteVars and readOnlyVars are also marked as isEnum and isPrimitiveType where appropriate --- .../languages/AbstractCSharpCodegen.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 2a0b97066b49..a3411f68a2a4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -470,6 +470,32 @@ private void postProcessEnumRefs(final Map models) { var.isPrimitiveType = true; } } + for (CodegenProperty var : model.readWriteVars) { + if (enumRefs.containsKey(var.dataType)) { + // Handle any enum properties referred to by $ref. + // This is different in C# than most other generators, because enums in C# are compiled to integral types, + // while enums in many other languages are true objects. + CodegenModel refModel = enumRefs.get(var.dataType); + var.allowableValues = refModel.allowableValues; + var.isEnum = true; + + // We do these after updateCodegenPropertyEnum to avoid generalities that don't mesh with C#. + var.isPrimitiveType = true; + } + } + for (CodegenProperty var : model.readOnlyVars) { + if (enumRefs.containsKey(var.dataType)) { + // Handle any enum properties referred to by $ref. + // This is different in C# than most other generators, because enums in C# are compiled to integral types, + // while enums in many other languages are true objects. + CodegenModel refModel = enumRefs.get(var.dataType); + var.allowableValues = refModel.allowableValues; + var.isEnum = true; + + // We do these after updateCodegenPropertyEnum to avoid generalities that don't mesh with C#. + var.isPrimitiveType = true; + } + } // We're looping all models here. if (model.isEnum) { From 2f614f0d3d3755f2c42016b4230e98a44f4c80a0 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Mon, 30 Mar 2020 15:13:13 -0400 Subject: [PATCH 4/9] Updated petstore sample with enum fix --- .../csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs index 48a0f2fa0844..035e37f0fd25 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs @@ -157,7 +157,7 @@ protected EnumTest() { } /// enumInteger. /// enumNumber. /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum outerEnum = default(OuterEnum)) + public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) { // to ensure "enumStringRequired" is required (not null) if (enumStringRequired == null) From 5727fab6a6f6337c5e1ab9bd75ba8d33d906b1d9 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Thu, 2 Apr 2020 14:15:27 -0400 Subject: [PATCH 5/9] Fields that are required should emit default values (otherwise the consuming API might throw a fit --- .../src/main/resources/csharp/modelGeneric.mustache | 4 ++-- .../src/Org.OpenAPITools/Model/Animal.cs | 2 +- .../src/Org.OpenAPITools/Model/Category.cs | 2 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 2 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 8 ++++---- .../OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs | 2 +- .../OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs | 4 ++-- .../src/Org.OpenAPITools/Model/TypeHolderDefault.cs | 10 +++++----- .../src/Org.OpenAPITools/Model/TypeHolderExample.cs | 12 ++++++------ 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 0b40840d5e63..65422c10c4de 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -31,7 +31,7 @@ {{#description}} /// {{description}} {{/description}} - [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})] + [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}{{#required}}true{{/required}}{{^required}}false{{/required}}{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})] public {{#complexType}}{{{complexType}}}{{/complexType}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } {{/isEnum}} {{/vars}} @@ -108,7 +108,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} /// {{#description}} /// {{description}}{{/description}} - [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})]{{#isDate}} + [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}{{#required}}true{{/required}}{{^required}}false{{/required}}{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})]{{#isDate}} [JsonConverter(typeof(OpenAPIDateConverter))]{{/isDate}} public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } {{/isEnum}} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs index 832fd0e36eb8..f3c0d8a79e8c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs @@ -71,7 +71,7 @@ protected Animal() { } /// /// Gets or Sets ClassName /// - [DataMember(Name="className", EmitDefaultValue=false)] + [DataMember(Name="className", EmitDefaultValue=true)] public string ClassName { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs index 9cf54d7ea340..2901d8bf67c4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs @@ -64,7 +64,7 @@ protected Category() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs index 035e37f0fd25..fe1b1e00aa1a 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs @@ -90,7 +90,7 @@ public enum EnumStringRequiredEnum /// /// Gets or Sets EnumStringRequired /// - [DataMember(Name="enum_string_required", EmitDefaultValue=false)] + [DataMember(Name="enum_string_required", EmitDefaultValue=true)] public EnumStringRequiredEnum EnumStringRequired { get; set; } /// /// Defines EnumInteger diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs index eedd4b6236e1..0346d447e435 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -127,7 +127,7 @@ protected FormatTest() { } /// /// Gets or Sets Number /// - [DataMember(Name="number", EmitDefaultValue=false)] + [DataMember(Name="number", EmitDefaultValue=true)] public decimal Number { get; set; } /// @@ -151,7 +151,7 @@ protected FormatTest() { } /// /// Gets or Sets Byte /// - [DataMember(Name="byte", EmitDefaultValue=false)] + [DataMember(Name="byte", EmitDefaultValue=true)] public byte[] Byte { get; set; } /// @@ -163,7 +163,7 @@ protected FormatTest() { } /// /// Gets or Sets Date /// - [DataMember(Name="date", EmitDefaultValue=false)] + [DataMember(Name="date", EmitDefaultValue=true)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime Date { get; set; } @@ -182,7 +182,7 @@ protected FormatTest() { } /// /// Gets or Sets Password /// - [DataMember(Name="password", EmitDefaultValue=false)] + [DataMember(Name="password", EmitDefaultValue=true)] public string Password { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs index 2c76d68a122b..c22d454e1ea4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs @@ -58,7 +58,7 @@ protected Name() { } /// /// Gets or Sets _Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public int _Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs index 4616c0230970..681dccedc28d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs @@ -120,13 +120,13 @@ protected Pet() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// /// Gets or Sets PhotoUrls /// - [DataMember(Name="photoUrls", EmitDefaultValue=false)] + [DataMember(Name="photoUrls", EmitDefaultValue=true)] public List PhotoUrls { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs index 5cce95ad3a0d..dbcea03c41ea 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs @@ -100,31 +100,31 @@ protected TypeHolderDefault() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs index f72c763b0397..0a71dbe00b87 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -111,37 +111,37 @@ protected TypeHolderExample() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets FloatItem /// - [DataMember(Name="float_item", EmitDefaultValue=false)] + [DataMember(Name="float_item", EmitDefaultValue=true)] public float FloatItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// From ecabacff4829f62308c4b55651fdb6e7ff95879c Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Thu, 23 Apr 2020 14:01:42 -0400 Subject: [PATCH 6/9] Added missing sample updated --- .../OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs index 595a92331504..eb028bacfb5b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs @@ -159,7 +159,7 @@ protected EnumTest() { } /// enumInteger. /// enumNumber. /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum outerEnum = default(OuterEnum)) + public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) { this.EnumStringRequired = enumStringRequired; this.EnumString = enumString; From 722342a124bbaf5f19ea50417b3a355f0d084c41 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Fri, 24 Apr 2020 10:34:16 -0400 Subject: [PATCH 7/9] Re-ran petstore example script to grab all changes --- .../csharp/OpenAPIClientNet35/docs/FakeApi.md | 62 +++++++------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 40 +++++----- .../src/Org.OpenAPITools/Model/Animal.cs | 4 +- .../src/Org.OpenAPITools/Model/Category.cs | 2 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 4 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 8 +- .../src/Org.OpenAPITools/Model/Name.cs | 2 +- .../src/Org.OpenAPITools/Model/Pet.cs | 4 +- .../Model/TypeHolderDefault.cs | 10 +-- .../Model/TypeHolderExample.cs | 12 +-- .../csharp/OpenAPIClientNet40/docs/FakeApi.md | 62 +++++++------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 40 +++++----- .../src/Org.OpenAPITools/Model/Animal.cs | 4 +- .../src/Org.OpenAPITools/Model/Category.cs | 2 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 4 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 8 +- .../src/Org.OpenAPITools/Model/Name.cs | 2 +- .../src/Org.OpenAPITools/Model/Pet.cs | 4 +- .../Model/TypeHolderDefault.cs | 10 +-- .../Model/TypeHolderExample.cs | 12 +-- .../docs/FakeApi.md | 62 +++++++------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 80 +++++++++---------- .../src/Org.OpenAPITools/Model/Animal.cs | 4 +- .../src/Org.OpenAPITools/Model/Category.cs | 2 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 4 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 8 +- .../src/Org.OpenAPITools/Model/Name.cs | 2 +- .../src/Org.OpenAPITools/Model/Pet.cs | 4 +- .../Model/TypeHolderDefault.cs | 10 +-- .../Model/TypeHolderExample.cs | 12 +-- .../OpenAPIClientNetStandard/docs/FakeApi.md | 62 +++++++------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 80 +++++++++---------- .../src/Org.OpenAPITools/Model/Animal.cs | 4 +- .../src/Org.OpenAPITools/Model/Category.cs | 2 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 4 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 8 +- .../src/Org.OpenAPITools/Model/Name.cs | 2 +- .../src/Org.OpenAPITools/Model/Pet.cs | 4 +- .../Model/TypeHolderDefault.cs | 10 +-- .../Model/TypeHolderExample.cs | 12 +-- .../docs/FakeApi.md | 62 +++++++------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 80 +++++++++---------- .../src/Org.OpenAPITools/Model/Animal.cs | 2 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 2 +- 44 files changed, 409 insertions(+), 409 deletions(-) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md index edffb58d3c79..661c2cba6ab3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md @@ -97,7 +97,7 @@ No authorization required ## FakeOuterBooleanSerialize -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (bool? body = null) @@ -120,7 +120,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool | Input boolean as post body (optional) + var body = true; // bool? | Input boolean as post body (optional) try { @@ -143,7 +143,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **bool**| Input boolean as post body | [optional] + **body** | **bool?**| Input boolean as post body | [optional] ### Return type @@ -245,7 +245,7 @@ No authorization required ## FakeOuterNumberSerialize -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (decimal? body = null) @@ -268,7 +268,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal | Input number as post body (optional) + var body = 8.14; // decimal? | Input number as post body (optional) try { @@ -291,7 +291,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **decimal**| Input number as post body | [optional] + **body** | **decimal?**| Input number as post body | [optional] ### Return type @@ -614,7 +614,7 @@ No authorization required ## TestEndpointParameters -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -645,14 +645,14 @@ namespace Example var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789; // long | None (optional) - var _float = 3.4F; // float | None (optional) + var integer = 56; // int? | None (optional) + var int32 = 56; // int? | None (optional) + var int64 = 789; // long? | None (optional) + var _float = 3.4F; // float? | None (optional) var _string = _string_example; // string | None (optional) var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None (optional) + var date = 2013-10-20; // DateTime? | None (optional) + var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) var password = password_example; // string | None (optional) var callback = callback_example; // string | None (optional) @@ -681,14 +681,14 @@ Name | Type | Description | Notes **_double** | **double**| None | **patternWithoutDelimiter** | **string**| None | **_byte** | **byte[]**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **long**| None | [optional] - **_float** | **float**| None | [optional] + **integer** | **int?**| None | [optional] + **int32** | **int?**| None | [optional] + **int64** | **long?**| None | [optional] + **_float** | **float?**| None | [optional] **_string** | **string**| None | [optional] **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime**| None | [optional] - **dateTime** | **DateTime**| None | [optional] + **date** | **DateTime?**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] **callback** | **string**| None | [optional] @@ -719,7 +719,7 @@ void (empty response body) ## TestEnumParameters -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -746,8 +746,8 @@ namespace Example var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double | Query parameter enum test (double) (optional) + var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -776,8 +776,8 @@ Name | Type | Description | Notes **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] @@ -808,7 +808,7 @@ No authorization required ## TestGroupParameters -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -834,9 +834,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) - var booleanGroup = true; // bool | Boolean in group parameters (optional) - var int64Group = 789; // long | Integer in group parameters (optional) + var stringGroup = 56; // int? | String in group parameters (optional) + var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var int64Group = 789; // long? | Integer in group parameters (optional) try { @@ -862,9 +862,9 @@ Name | Type | Description | Notes **requiredStringGroup** | **int**| Required String in group parameters | **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int**| String in group parameters | [optional] - **booleanGroup** | **bool**| Boolean in group parameters | [optional] - **int64Group** | **long**| Integer in group parameters | [optional] + **stringGroup** | **int?**| String in group parameters | [optional] + **booleanGroup** | **bool?**| Boolean in group parameters | [optional] + **int64Group** | **long?**| Integer in group parameters | [optional] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs index c933df3c19e2..d2255161537d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs @@ -54,7 +54,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize (bool body = default(bool)); + bool FakeOuterBooleanSerialize (bool? body = default(bool?)); /// /// @@ -65,7 +65,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -96,7 +96,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize (decimal body = default(decimal)); + decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); /// /// @@ -107,7 +107,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -216,7 +216,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -257,7 +257,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -275,7 +275,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -290,7 +290,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -306,7 +306,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -574,7 +574,7 @@ public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize (bool body = default(bool)) + public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) { ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -586,7 +586,7 @@ public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)) + public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "/fake/outer/boolean"; @@ -714,7 +714,7 @@ public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize (decimal body = default(decimal)) + public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) { ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -726,7 +726,7 @@ public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)) + public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "/fake/outer/number"; @@ -1091,7 +1091,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -1115,7 +1115,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -1204,7 +1204,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -1222,7 +1222,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "/fake"; @@ -1285,7 +1285,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -1301,7 +1301,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs index 464ee255eb9a..7a099f21b4a3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs @@ -29,7 +29,7 @@ namespace Org.OpenAPITools.Model /// Animal /// [DataContract] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] + [JsonConverter(typeof(JsonSubtypes), "className")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] @@ -71,7 +71,7 @@ protected Animal() { } /// /// Gets or Sets ClassName /// - [DataMember(Name="className", EmitDefaultValue=false)] + [DataMember(Name="className", EmitDefaultValue=true)] public string ClassName { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Category.cs index 34612d86007b..4261e7767d38 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Category.cs @@ -64,7 +64,7 @@ protected Category() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumTest.cs index 824b6d85716e..fb86bb0c298c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumTest.cs @@ -90,7 +90,7 @@ public enum EnumStringRequiredEnum /// /// Gets or Sets EnumStringRequired /// - [DataMember(Name="enum_string_required", EmitDefaultValue=false)] + [DataMember(Name="enum_string_required", EmitDefaultValue=true)] public EnumStringRequiredEnum EnumStringRequired { get; set; } /// /// Defines EnumInteger @@ -157,7 +157,7 @@ protected EnumTest() { } /// enumInteger. /// enumNumber. /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum outerEnum = default(OuterEnum)) + public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) { // to ensure "enumStringRequired" is required (not null) if (enumStringRequired == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs index 018c10fb6061..13dc6109e349 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs @@ -127,7 +127,7 @@ protected FormatTest() { } /// /// Gets or Sets Number /// - [DataMember(Name="number", EmitDefaultValue=false)] + [DataMember(Name="number", EmitDefaultValue=true)] public decimal Number { get; set; } /// @@ -151,7 +151,7 @@ protected FormatTest() { } /// /// Gets or Sets Byte /// - [DataMember(Name="byte", EmitDefaultValue=false)] + [DataMember(Name="byte", EmitDefaultValue=true)] public byte[] Byte { get; set; } /// @@ -163,7 +163,7 @@ protected FormatTest() { } /// /// Gets or Sets Date /// - [DataMember(Name="date", EmitDefaultValue=false)] + [DataMember(Name="date", EmitDefaultValue=true)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime Date { get; set; } @@ -182,7 +182,7 @@ protected FormatTest() { } /// /// Gets or Sets Password /// - [DataMember(Name="password", EmitDefaultValue=false)] + [DataMember(Name="password", EmitDefaultValue=true)] public string Password { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Name.cs index 948ed5889cc5..c9040b4538e8 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Name.cs @@ -58,7 +58,7 @@ protected Name() { } /// /// Gets or Sets _Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public int _Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Pet.cs index c9994c453aa4..2329c8b0690e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Pet.cs @@ -120,13 +120,13 @@ protected Pet() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// /// Gets or Sets PhotoUrls /// - [DataMember(Name="photoUrls", EmitDefaultValue=false)] + [DataMember(Name="photoUrls", EmitDefaultValue=true)] public List PhotoUrls { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderDefault.cs index 00789fba4d72..0e02333a151d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderDefault.cs @@ -100,31 +100,31 @@ protected TypeHolderDefault() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs index 086e142bed6b..ef1da190a1c0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -111,37 +111,37 @@ protected TypeHolderExample() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets FloatItem /// - [DataMember(Name="float_item", EmitDefaultValue=false)] + [DataMember(Name="float_item", EmitDefaultValue=true)] public float FloatItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md index edffb58d3c79..661c2cba6ab3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md @@ -97,7 +97,7 @@ No authorization required ## FakeOuterBooleanSerialize -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (bool? body = null) @@ -120,7 +120,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool | Input boolean as post body (optional) + var body = true; // bool? | Input boolean as post body (optional) try { @@ -143,7 +143,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **bool**| Input boolean as post body | [optional] + **body** | **bool?**| Input boolean as post body | [optional] ### Return type @@ -245,7 +245,7 @@ No authorization required ## FakeOuterNumberSerialize -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (decimal? body = null) @@ -268,7 +268,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal | Input number as post body (optional) + var body = 8.14; // decimal? | Input number as post body (optional) try { @@ -291,7 +291,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **decimal**| Input number as post body | [optional] + **body** | **decimal?**| Input number as post body | [optional] ### Return type @@ -614,7 +614,7 @@ No authorization required ## TestEndpointParameters -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -645,14 +645,14 @@ namespace Example var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789; // long | None (optional) - var _float = 3.4F; // float | None (optional) + var integer = 56; // int? | None (optional) + var int32 = 56; // int? | None (optional) + var int64 = 789; // long? | None (optional) + var _float = 3.4F; // float? | None (optional) var _string = _string_example; // string | None (optional) var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None (optional) + var date = 2013-10-20; // DateTime? | None (optional) + var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) var password = password_example; // string | None (optional) var callback = callback_example; // string | None (optional) @@ -681,14 +681,14 @@ Name | Type | Description | Notes **_double** | **double**| None | **patternWithoutDelimiter** | **string**| None | **_byte** | **byte[]**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **long**| None | [optional] - **_float** | **float**| None | [optional] + **integer** | **int?**| None | [optional] + **int32** | **int?**| None | [optional] + **int64** | **long?**| None | [optional] + **_float** | **float?**| None | [optional] **_string** | **string**| None | [optional] **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime**| None | [optional] - **dateTime** | **DateTime**| None | [optional] + **date** | **DateTime?**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] **callback** | **string**| None | [optional] @@ -719,7 +719,7 @@ void (empty response body) ## TestEnumParameters -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -746,8 +746,8 @@ namespace Example var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double | Query parameter enum test (double) (optional) + var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -776,8 +776,8 @@ Name | Type | Description | Notes **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] @@ -808,7 +808,7 @@ No authorization required ## TestGroupParameters -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -834,9 +834,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) - var booleanGroup = true; // bool | Boolean in group parameters (optional) - var int64Group = 789; // long | Integer in group parameters (optional) + var stringGroup = 56; // int? | String in group parameters (optional) + var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var int64Group = 789; // long? | Integer in group parameters (optional) try { @@ -862,9 +862,9 @@ Name | Type | Description | Notes **requiredStringGroup** | **int**| Required String in group parameters | **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int**| String in group parameters | [optional] - **booleanGroup** | **bool**| Boolean in group parameters | [optional] - **int64Group** | **long**| Integer in group parameters | [optional] + **stringGroup** | **int?**| String in group parameters | [optional] + **booleanGroup** | **bool?**| Boolean in group parameters | [optional] + **int64Group** | **long?**| Integer in group parameters | [optional] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs index 375d57575239..87e2ad08ec8c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs @@ -54,7 +54,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize (bool body = default(bool)); + bool FakeOuterBooleanSerialize (bool? body = default(bool?)); /// /// @@ -65,7 +65,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -96,7 +96,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize (decimal body = default(decimal)); + decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); /// /// @@ -107,7 +107,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -216,7 +216,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -257,7 +257,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -275,7 +275,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -290,7 +290,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -306,7 +306,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -574,7 +574,7 @@ public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize (bool body = default(bool)) + public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) { ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -586,7 +586,7 @@ public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)) + public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "/fake/outer/boolean"; @@ -714,7 +714,7 @@ public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize (decimal body = default(decimal)) + public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) { ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -726,7 +726,7 @@ public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)) + public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "/fake/outer/number"; @@ -1091,7 +1091,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -1115,7 +1115,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -1204,7 +1204,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -1222,7 +1222,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "/fake"; @@ -1285,7 +1285,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -1301,7 +1301,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs index eb9b58f20753..f3c0d8a79e8c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs @@ -29,7 +29,7 @@ namespace Org.OpenAPITools.Model /// Animal /// [DataContract] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] + [JsonConverter(typeof(JsonSubtypes), "className")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] @@ -71,7 +71,7 @@ protected Animal() { } /// /// Gets or Sets ClassName /// - [DataMember(Name="className", EmitDefaultValue=false)] + [DataMember(Name="className", EmitDefaultValue=true)] public string ClassName { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Category.cs index 9cf54d7ea340..2901d8bf67c4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Category.cs @@ -64,7 +64,7 @@ protected Category() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumTest.cs index 48a0f2fa0844..fe1b1e00aa1a 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumTest.cs @@ -90,7 +90,7 @@ public enum EnumStringRequiredEnum /// /// Gets or Sets EnumStringRequired /// - [DataMember(Name="enum_string_required", EmitDefaultValue=false)] + [DataMember(Name="enum_string_required", EmitDefaultValue=true)] public EnumStringRequiredEnum EnumStringRequired { get; set; } /// /// Defines EnumInteger @@ -157,7 +157,7 @@ protected EnumTest() { } /// enumInteger. /// enumNumber. /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum outerEnum = default(OuterEnum)) + public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) { // to ensure "enumStringRequired" is required (not null) if (enumStringRequired == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs index eedd4b6236e1..0346d447e435 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs @@ -127,7 +127,7 @@ protected FormatTest() { } /// /// Gets or Sets Number /// - [DataMember(Name="number", EmitDefaultValue=false)] + [DataMember(Name="number", EmitDefaultValue=true)] public decimal Number { get; set; } /// @@ -151,7 +151,7 @@ protected FormatTest() { } /// /// Gets or Sets Byte /// - [DataMember(Name="byte", EmitDefaultValue=false)] + [DataMember(Name="byte", EmitDefaultValue=true)] public byte[] Byte { get; set; } /// @@ -163,7 +163,7 @@ protected FormatTest() { } /// /// Gets or Sets Date /// - [DataMember(Name="date", EmitDefaultValue=false)] + [DataMember(Name="date", EmitDefaultValue=true)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime Date { get; set; } @@ -182,7 +182,7 @@ protected FormatTest() { } /// /// Gets or Sets Password /// - [DataMember(Name="password", EmitDefaultValue=false)] + [DataMember(Name="password", EmitDefaultValue=true)] public string Password { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Name.cs index 2c76d68a122b..c22d454e1ea4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Name.cs @@ -58,7 +58,7 @@ protected Name() { } /// /// Gets or Sets _Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public int _Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Pet.cs index 4616c0230970..681dccedc28d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Pet.cs @@ -120,13 +120,13 @@ protected Pet() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// /// Gets or Sets PhotoUrls /// - [DataMember(Name="photoUrls", EmitDefaultValue=false)] + [DataMember(Name="photoUrls", EmitDefaultValue=true)] public List PhotoUrls { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderDefault.cs index 5cce95ad3a0d..dbcea03c41ea 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderDefault.cs @@ -100,31 +100,31 @@ protected TypeHolderDefault() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs index f72c763b0397..0a71dbe00b87 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -111,37 +111,37 @@ protected TypeHolderExample() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets FloatItem /// - [DataMember(Name="float_item", EmitDefaultValue=false)] + [DataMember(Name="float_item", EmitDefaultValue=true)] public float FloatItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md index edffb58d3c79..661c2cba6ab3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md @@ -97,7 +97,7 @@ No authorization required ## FakeOuterBooleanSerialize -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (bool? body = null) @@ -120,7 +120,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool | Input boolean as post body (optional) + var body = true; // bool? | Input boolean as post body (optional) try { @@ -143,7 +143,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **bool**| Input boolean as post body | [optional] + **body** | **bool?**| Input boolean as post body | [optional] ### Return type @@ -245,7 +245,7 @@ No authorization required ## FakeOuterNumberSerialize -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (decimal? body = null) @@ -268,7 +268,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal | Input number as post body (optional) + var body = 8.14; // decimal? | Input number as post body (optional) try { @@ -291,7 +291,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **decimal**| Input number as post body | [optional] + **body** | **decimal?**| Input number as post body | [optional] ### Return type @@ -614,7 +614,7 @@ No authorization required ## TestEndpointParameters -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -645,14 +645,14 @@ namespace Example var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789; // long | None (optional) - var _float = 3.4F; // float | None (optional) + var integer = 56; // int? | None (optional) + var int32 = 56; // int? | None (optional) + var int64 = 789; // long? | None (optional) + var _float = 3.4F; // float? | None (optional) var _string = _string_example; // string | None (optional) var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None (optional) + var date = 2013-10-20; // DateTime? | None (optional) + var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) var password = password_example; // string | None (optional) var callback = callback_example; // string | None (optional) @@ -681,14 +681,14 @@ Name | Type | Description | Notes **_double** | **double**| None | **patternWithoutDelimiter** | **string**| None | **_byte** | **byte[]**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **long**| None | [optional] - **_float** | **float**| None | [optional] + **integer** | **int?**| None | [optional] + **int32** | **int?**| None | [optional] + **int64** | **long?**| None | [optional] + **_float** | **float?**| None | [optional] **_string** | **string**| None | [optional] **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime**| None | [optional] - **dateTime** | **DateTime**| None | [optional] + **date** | **DateTime?**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] **callback** | **string**| None | [optional] @@ -719,7 +719,7 @@ void (empty response body) ## TestEnumParameters -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -746,8 +746,8 @@ namespace Example var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double | Query parameter enum test (double) (optional) + var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -776,8 +776,8 @@ Name | Type | Description | Notes **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] @@ -808,7 +808,7 @@ No authorization required ## TestGroupParameters -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -834,9 +834,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) - var booleanGroup = true; // bool | Boolean in group parameters (optional) - var int64Group = 789; // long | Integer in group parameters (optional) + var stringGroup = 56; // int? | String in group parameters (optional) + var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var int64Group = 789; // long? | Integer in group parameters (optional) try { @@ -862,9 +862,9 @@ Name | Type | Description | Notes **requiredStringGroup** | **int**| Required String in group parameters | **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int**| String in group parameters | [optional] - **booleanGroup** | **bool**| Boolean in group parameters | [optional] - **int64Group** | **long**| Integer in group parameters | [optional] + **stringGroup** | **int?**| String in group parameters | [optional] + **booleanGroup** | **bool?**| Boolean in group parameters | [optional] + **int64Group** | **long?**| Integer in group parameters | [optional] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs index 51077f789e20..42d7e6b373c0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs @@ -54,7 +54,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize (bool body = default(bool)); + bool FakeOuterBooleanSerialize (bool? body = default(bool?)); /// /// @@ -65,7 +65,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -96,7 +96,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize (decimal body = default(decimal)); + decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); /// /// @@ -107,7 +107,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -216,7 +216,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -257,7 +257,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -275,7 +275,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -290,7 +290,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -306,7 +306,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -412,7 +412,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)); /// /// @@ -423,7 +423,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -454,7 +454,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)); /// /// @@ -465,7 +465,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -574,7 +574,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -598,7 +598,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -615,7 +615,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -633,7 +633,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -648,7 +648,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -664,7 +664,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -1010,7 +1010,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize (bool body = default(bool)) + public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) { ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1022,7 +1022,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)) + public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "./fake/outer/boolean"; @@ -1080,7 +1080,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)) { ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1093,7 +1093,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "./fake/outer/boolean"; @@ -1292,7 +1292,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize (decimal body = default(decimal)) + public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) { ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1304,7 +1304,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)) + public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "./fake/outer/number"; @@ -1362,7 +1362,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)) { ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1375,7 +1375,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "./fake/outer/number"; @@ -2038,7 +2038,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2062,7 +2062,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2157,7 +2157,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -2182,7 +2182,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2271,7 +2271,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2289,7 +2289,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "./fake"; @@ -2354,7 +2354,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { await TestEnumParametersAsyncWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -2373,7 +2373,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "./fake"; @@ -2436,7 +2436,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2452,7 +2452,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2521,7 +2521,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { await TestGroupParametersAsyncWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); @@ -2538,7 +2538,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Animal.cs index 1f209ecbc1c4..455c3a9bcef3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Animal.cs @@ -27,7 +27,7 @@ namespace Org.OpenAPITools.Model /// Animal /// [DataContract] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] + [JsonConverter(typeof(JsonSubtypes), "className")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] @@ -69,7 +69,7 @@ protected Animal() { } /// /// Gets or Sets ClassName /// - [DataMember(Name="className", EmitDefaultValue=false)] + [DataMember(Name="className", EmitDefaultValue=true)] public string ClassName { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Category.cs index 845a5fba42ff..6dd4b2c6f254 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Category.cs @@ -62,7 +62,7 @@ protected Category() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumTest.cs index 8854d4e9610c..e234f80d68de 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumTest.cs @@ -88,7 +88,7 @@ public enum EnumStringRequiredEnum /// /// Gets or Sets EnumStringRequired /// - [DataMember(Name="enum_string_required", EmitDefaultValue=false)] + [DataMember(Name="enum_string_required", EmitDefaultValue=true)] public EnumStringRequiredEnum EnumStringRequired { get; set; } /// /// Defines EnumInteger @@ -155,7 +155,7 @@ protected EnumTest() { } /// enumInteger. /// enumNumber. /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum outerEnum = default(OuterEnum)) + public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) { // to ensure "enumStringRequired" is required (not null) if (enumStringRequired == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs index 714402191f51..8128f7a332c7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs @@ -125,7 +125,7 @@ protected FormatTest() { } /// /// Gets or Sets Number /// - [DataMember(Name="number", EmitDefaultValue=false)] + [DataMember(Name="number", EmitDefaultValue=true)] public decimal Number { get; set; } /// @@ -149,7 +149,7 @@ protected FormatTest() { } /// /// Gets or Sets Byte /// - [DataMember(Name="byte", EmitDefaultValue=false)] + [DataMember(Name="byte", EmitDefaultValue=true)] public byte[] Byte { get; set; } /// @@ -161,7 +161,7 @@ protected FormatTest() { } /// /// Gets or Sets Date /// - [DataMember(Name="date", EmitDefaultValue=false)] + [DataMember(Name="date", EmitDefaultValue=true)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime Date { get; set; } @@ -180,7 +180,7 @@ protected FormatTest() { } /// /// Gets or Sets Password /// - [DataMember(Name="password", EmitDefaultValue=false)] + [DataMember(Name="password", EmitDefaultValue=true)] public string Password { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Name.cs index fa62132db171..64fdd861b644 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Name.cs @@ -56,7 +56,7 @@ protected Name() { } /// /// Gets or Sets _Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public int _Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Pet.cs index 3e1f5c228bc7..ac454a7840af 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Pet.cs @@ -118,13 +118,13 @@ protected Pet() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// /// Gets or Sets PhotoUrls /// - [DataMember(Name="photoUrls", EmitDefaultValue=false)] + [DataMember(Name="photoUrls", EmitDefaultValue=true)] public List PhotoUrls { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderDefault.cs index 93307c2324a6..8dcfb5aee00b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderDefault.cs @@ -98,31 +98,31 @@ protected TypeHolderDefault() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs index a4c7d9f028da..74fdf9563a85 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -109,37 +109,37 @@ protected TypeHolderExample() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets FloatItem /// - [DataMember(Name="float_item", EmitDefaultValue=false)] + [DataMember(Name="float_item", EmitDefaultValue=true)] public float FloatItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md index edffb58d3c79..661c2cba6ab3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md @@ -97,7 +97,7 @@ No authorization required ## FakeOuterBooleanSerialize -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (bool? body = null) @@ -120,7 +120,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool | Input boolean as post body (optional) + var body = true; // bool? | Input boolean as post body (optional) try { @@ -143,7 +143,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **bool**| Input boolean as post body | [optional] + **body** | **bool?**| Input boolean as post body | [optional] ### Return type @@ -245,7 +245,7 @@ No authorization required ## FakeOuterNumberSerialize -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (decimal? body = null) @@ -268,7 +268,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal | Input number as post body (optional) + var body = 8.14; // decimal? | Input number as post body (optional) try { @@ -291,7 +291,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **decimal**| Input number as post body | [optional] + **body** | **decimal?**| Input number as post body | [optional] ### Return type @@ -614,7 +614,7 @@ No authorization required ## TestEndpointParameters -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -645,14 +645,14 @@ namespace Example var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789; // long | None (optional) - var _float = 3.4F; // float | None (optional) + var integer = 56; // int? | None (optional) + var int32 = 56; // int? | None (optional) + var int64 = 789; // long? | None (optional) + var _float = 3.4F; // float? | None (optional) var _string = _string_example; // string | None (optional) var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None (optional) + var date = 2013-10-20; // DateTime? | None (optional) + var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) var password = password_example; // string | None (optional) var callback = callback_example; // string | None (optional) @@ -681,14 +681,14 @@ Name | Type | Description | Notes **_double** | **double**| None | **patternWithoutDelimiter** | **string**| None | **_byte** | **byte[]**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **long**| None | [optional] - **_float** | **float**| None | [optional] + **integer** | **int?**| None | [optional] + **int32** | **int?**| None | [optional] + **int64** | **long?**| None | [optional] + **_float** | **float?**| None | [optional] **_string** | **string**| None | [optional] **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime**| None | [optional] - **dateTime** | **DateTime**| None | [optional] + **date** | **DateTime?**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] **callback** | **string**| None | [optional] @@ -719,7 +719,7 @@ void (empty response body) ## TestEnumParameters -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -746,8 +746,8 @@ namespace Example var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double | Query parameter enum test (double) (optional) + var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -776,8 +776,8 @@ Name | Type | Description | Notes **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] @@ -808,7 +808,7 @@ No authorization required ## TestGroupParameters -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -834,9 +834,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) - var booleanGroup = true; // bool | Boolean in group parameters (optional) - var int64Group = 789; // long | Integer in group parameters (optional) + var stringGroup = 56; // int? | String in group parameters (optional) + var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var int64Group = 789; // long? | Integer in group parameters (optional) try { @@ -862,9 +862,9 @@ Name | Type | Description | Notes **requiredStringGroup** | **int**| Required String in group parameters | **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int**| String in group parameters | [optional] - **booleanGroup** | **bool**| Boolean in group parameters | [optional] - **int64Group** | **long**| Integer in group parameters | [optional] + **stringGroup** | **int?**| String in group parameters | [optional] + **booleanGroup** | **bool?**| Boolean in group parameters | [optional] + **int64Group** | **long?**| Integer in group parameters | [optional] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs index 129610f908f9..e0b9c8bbe2f9 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs @@ -54,7 +54,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize (bool body = default(bool)); + bool FakeOuterBooleanSerialize (bool? body = default(bool?)); /// /// @@ -65,7 +65,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -96,7 +96,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize (decimal body = default(decimal)); + decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); /// /// @@ -107,7 +107,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -216,7 +216,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -257,7 +257,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -275,7 +275,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -290,7 +290,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -306,7 +306,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -412,7 +412,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)); /// /// @@ -423,7 +423,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -454,7 +454,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)); /// /// @@ -465,7 +465,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -574,7 +574,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -598,7 +598,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -615,7 +615,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -633,7 +633,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -648,7 +648,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -664,7 +664,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -1010,7 +1010,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize (bool body = default(bool)) + public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) { ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1022,7 +1022,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)) + public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "./fake/outer/boolean"; @@ -1080,7 +1080,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)) { ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1093,7 +1093,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "./fake/outer/boolean"; @@ -1292,7 +1292,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize (decimal body = default(decimal)) + public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) { ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1304,7 +1304,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)) + public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "./fake/outer/number"; @@ -1362,7 +1362,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)) { ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1375,7 +1375,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "./fake/outer/number"; @@ -2038,7 +2038,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2062,7 +2062,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2157,7 +2157,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -2182,7 +2182,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2271,7 +2271,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2289,7 +2289,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "./fake"; @@ -2354,7 +2354,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { await TestEnumParametersAsyncWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -2373,7 +2373,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "./fake"; @@ -2436,7 +2436,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2452,7 +2452,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2521,7 +2521,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { await TestGroupParametersAsyncWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); @@ -2538,7 +2538,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs index 1f209ecbc1c4..455c3a9bcef3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs @@ -27,7 +27,7 @@ namespace Org.OpenAPITools.Model /// Animal /// [DataContract] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] + [JsonConverter(typeof(JsonSubtypes), "className")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] @@ -69,7 +69,7 @@ protected Animal() { } /// /// Gets or Sets ClassName /// - [DataMember(Name="className", EmitDefaultValue=false)] + [DataMember(Name="className", EmitDefaultValue=true)] public string ClassName { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Category.cs index 845a5fba42ff..6dd4b2c6f254 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Category.cs @@ -62,7 +62,7 @@ protected Category() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumTest.cs index 8854d4e9610c..e234f80d68de 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumTest.cs @@ -88,7 +88,7 @@ public enum EnumStringRequiredEnum /// /// Gets or Sets EnumStringRequired /// - [DataMember(Name="enum_string_required", EmitDefaultValue=false)] + [DataMember(Name="enum_string_required", EmitDefaultValue=true)] public EnumStringRequiredEnum EnumStringRequired { get; set; } /// /// Defines EnumInteger @@ -155,7 +155,7 @@ protected EnumTest() { } /// enumInteger. /// enumNumber. /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum outerEnum = default(OuterEnum)) + public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) { // to ensure "enumStringRequired" is required (not null) if (enumStringRequired == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs index 714402191f51..8128f7a332c7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs @@ -125,7 +125,7 @@ protected FormatTest() { } /// /// Gets or Sets Number /// - [DataMember(Name="number", EmitDefaultValue=false)] + [DataMember(Name="number", EmitDefaultValue=true)] public decimal Number { get; set; } /// @@ -149,7 +149,7 @@ protected FormatTest() { } /// /// Gets or Sets Byte /// - [DataMember(Name="byte", EmitDefaultValue=false)] + [DataMember(Name="byte", EmitDefaultValue=true)] public byte[] Byte { get; set; } /// @@ -161,7 +161,7 @@ protected FormatTest() { } /// /// Gets or Sets Date /// - [DataMember(Name="date", EmitDefaultValue=false)] + [DataMember(Name="date", EmitDefaultValue=true)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime Date { get; set; } @@ -180,7 +180,7 @@ protected FormatTest() { } /// /// Gets or Sets Password /// - [DataMember(Name="password", EmitDefaultValue=false)] + [DataMember(Name="password", EmitDefaultValue=true)] public string Password { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Name.cs index fa62132db171..64fdd861b644 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Name.cs @@ -56,7 +56,7 @@ protected Name() { } /// /// Gets or Sets _Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public int _Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Pet.cs index 3e1f5c228bc7..ac454a7840af 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Pet.cs @@ -118,13 +118,13 @@ protected Pet() { } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// /// Gets or Sets PhotoUrls /// - [DataMember(Name="photoUrls", EmitDefaultValue=false)] + [DataMember(Name="photoUrls", EmitDefaultValue=true)] public List PhotoUrls { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderDefault.cs index 93307c2324a6..8dcfb5aee00b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderDefault.cs @@ -98,31 +98,31 @@ protected TypeHolderDefault() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs index a4c7d9f028da..74fdf9563a85 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -109,37 +109,37 @@ protected TypeHolderExample() { } /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets FloatItem /// - [DataMember(Name="float_item", EmitDefaultValue=false)] + [DataMember(Name="float_item", EmitDefaultValue=true)] public float FloatItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md index edffb58d3c79..661c2cba6ab3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md @@ -97,7 +97,7 @@ No authorization required ## FakeOuterBooleanSerialize -> bool FakeOuterBooleanSerialize (bool body = null) +> bool FakeOuterBooleanSerialize (bool? body = null) @@ -120,7 +120,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool | Input boolean as post body (optional) + var body = true; // bool? | Input boolean as post body (optional) try { @@ -143,7 +143,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **bool**| Input boolean as post body | [optional] + **body** | **bool?**| Input boolean as post body | [optional] ### Return type @@ -245,7 +245,7 @@ No authorization required ## FakeOuterNumberSerialize -> decimal FakeOuterNumberSerialize (decimal body = null) +> decimal FakeOuterNumberSerialize (decimal? body = null) @@ -268,7 +268,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal | Input number as post body (optional) + var body = 8.14; // decimal? | Input number as post body (optional) try { @@ -291,7 +291,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **decimal**| Input number as post body | [optional] + **body** | **decimal?**| Input number as post body | [optional] ### Return type @@ -614,7 +614,7 @@ No authorization required ## TestEndpointParameters -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -645,14 +645,14 @@ namespace Example var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789; // long | None (optional) - var _float = 3.4F; // float | None (optional) + var integer = 56; // int? | None (optional) + var int32 = 56; // int? | None (optional) + var int64 = 789; // long? | None (optional) + var _float = 3.4F; // float? | None (optional) var _string = _string_example; // string | None (optional) var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None (optional) + var date = 2013-10-20; // DateTime? | None (optional) + var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) var password = password_example; // string | None (optional) var callback = callback_example; // string | None (optional) @@ -681,14 +681,14 @@ Name | Type | Description | Notes **_double** | **double**| None | **patternWithoutDelimiter** | **string**| None | **_byte** | **byte[]**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **long**| None | [optional] - **_float** | **float**| None | [optional] + **integer** | **int?**| None | [optional] + **int32** | **int?**| None | [optional] + **int64** | **long?**| None | [optional] + **_float** | **float?**| None | [optional] **_string** | **string**| None | [optional] **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime**| None | [optional] - **dateTime** | **DateTime**| None | [optional] + **date** | **DateTime?**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] **callback** | **string**| None | [optional] @@ -719,7 +719,7 @@ void (empty response body) ## TestEnumParameters -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -746,8 +746,8 @@ namespace Example var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double | Query parameter enum test (double) (optional) + var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) @@ -776,8 +776,8 @@ Name | Type | Description | Notes **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] @@ -808,7 +808,7 @@ No authorization required ## TestGroupParameters -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -834,9 +834,9 @@ namespace Example var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) - var booleanGroup = true; // bool | Boolean in group parameters (optional) - var int64Group = 789; // long | Integer in group parameters (optional) + var stringGroup = 56; // int? | String in group parameters (optional) + var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var int64Group = 789; // long? | Integer in group parameters (optional) try { @@ -862,9 +862,9 @@ Name | Type | Description | Notes **requiredStringGroup** | **int**| Required String in group parameters | **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int**| String in group parameters | [optional] - **booleanGroup** | **bool**| Boolean in group parameters | [optional] - **int64Group** | **long**| Integer in group parameters | [optional] + **stringGroup** | **int?**| String in group parameters | [optional] + **booleanGroup** | **bool?**| Boolean in group parameters | [optional] + **int64Group** | **long?**| Integer in group parameters | [optional] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs index e7f144292bb9..d739d62f0a98 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs @@ -54,7 +54,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize (bool body = default(bool)); + bool FakeOuterBooleanSerialize (bool? body = default(bool?)); /// /// @@ -65,7 +65,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -96,7 +96,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize (decimal body = default(decimal)); + decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); /// /// @@ -107,7 +107,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -216,7 +216,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -257,7 +257,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -275,7 +275,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -290,7 +290,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -306,7 +306,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -412,7 +412,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)); /// /// @@ -423,7 +423,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -454,7 +454,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)); /// /// @@ -465,7 +465,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -574,7 +574,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -598,7 +598,7 @@ public interface IFakeApi : IApiAccessor /// None (optional) /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -615,7 +615,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -633,7 +633,7 @@ public interface IFakeApi : IApiAccessor /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); + System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -648,7 +648,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -664,7 +664,7 @@ public interface IFakeApi : IApiAccessor /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); + System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -1010,7 +1010,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize (bool body = default(bool)) + public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) { ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1022,7 +1022,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)) + public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "/fake/outer/boolean"; @@ -1080,7 +1080,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)) { ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1093,7 +1093,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)) { var localVarPath = "/fake/outer/boolean"; @@ -1292,7 +1292,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize (decimal body = default(decimal)) + public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) { ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1304,7 +1304,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)) + public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "/fake/outer/number"; @@ -1362,7 +1362,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)) { ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1375,7 +1375,7 @@ public async System.Threading.Tasks.Task> CreateXmlItemAsync /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)) { var localVarPath = "/fake/outer/number"; @@ -2038,7 +2038,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2062,7 +2062,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2157,7 +2157,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -2182,7 +2182,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// None (optional) /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2271,7 +2271,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2289,7 +2289,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "/fake"; @@ -2354,7 +2354,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { await TestEnumParametersAsyncWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -2373,7 +2373,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) + public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "/fake"; @@ -2436,7 +2436,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2452,7 +2452,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2521,7 +2521,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { await TestGroupParametersAsyncWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); @@ -2538,7 +2538,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) + public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs index 2180878c9cd3..e51ad5f9cbb4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs @@ -31,7 +31,7 @@ namespace Org.OpenAPITools.Model /// Animal /// [DataContract] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] + [JsonConverter(typeof(JsonSubtypes), "className")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs index c712f71825e2..d8c3e6f1cab9 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs @@ -160,7 +160,7 @@ protected EnumTest() { } /// enumInteger. /// enumNumber. /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum outerEnum = default(OuterEnum)) + public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) { // to ensure "enumStringRequired" is required (not null) if (enumStringRequired == null) From cda388658845ec2cda6d42b8443f44448149a491 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Fri, 24 Apr 2020 13:02:07 -0400 Subject: [PATCH 8/9] Rebased and re-ran example update script --- .../src/Org.OpenAPITools/Api/FakeApi.cs | 2 +- .../src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Model/FormatTest.cs | 16 +--------------- .../src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Model/FormatTest.cs | 16 +--------------- .../src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Api/FakeApi.cs | 2 +- .../src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Api/FakeApi.cs | 2 +- .../src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Model/FormatTest.cs | 16 +--------------- 12 files changed, 6 insertions(+), 54 deletions(-) diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index d739d62f0a98..3749f51f3f9e 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -2403,7 +2403,7 @@ public async System.Threading.Tasks.Task> TestClientMod if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter + if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.ParameterToString(enumFormStringArray)); // form parameter if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs index 9ccb39dfeedd..4d536076615e 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -500,7 +500,6 @@ public static string SanitizeFilename(string filename) /// Convert params to key/value pairs. /// Use collectionFormat to properly format lists and collections. /// - /// Collection format. /// Key name. /// Value object. /// A list of KeyValuePairs diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs index 0346d447e435..becce06e2006 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -367,8 +367,6 @@ public override int GetHashCode() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - - // Integer (int) maximum if(this.Integer > (int)100) { @@ -381,8 +379,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); } - - // Int32 (int) maximum if(this.Int32 > (int)200) { @@ -395,8 +391,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); } - - // Number (decimal) maximum if(this.Number > (decimal)543.2) { @@ -409,8 +403,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" }); } - - // Float (float) maximum if(this.Float > (float)987.6) { @@ -423,8 +415,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" }); } - - // Double (double) maximum if(this.Double > (double)123.4) { @@ -437,8 +427,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); } - - // String (string) pattern Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) @@ -446,8 +434,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); } - - // Password (string) maxLength if(this.Password != null && this.Password.Length > 64) { @@ -459,7 +445,7 @@ public override int GetHashCode() { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" }); } - + yield break; } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs index 8c65f55887b8..0d0e5fad12f5 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs @@ -473,7 +473,6 @@ public static string SanitizeFilename(string filename) /// Convert params to key/value pairs. /// Use collectionFormat to properly format lists and collections. /// - /// Collection format. /// Key name. /// Value object. /// A list of KeyValuePairs diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs index 8c65f55887b8..0d0e5fad12f5 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs @@ -473,7 +473,6 @@ public static string SanitizeFilename(string filename) /// Convert params to key/value pairs. /// Use collectionFormat to properly format lists and collections. /// - /// Collection format. /// Key name. /// Value object. /// A list of KeyValuePairs diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs index 0346d447e435..becce06e2006 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs @@ -367,8 +367,6 @@ public override int GetHashCode() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - - // Integer (int) maximum if(this.Integer > (int)100) { @@ -381,8 +379,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); } - - // Int32 (int) maximum if(this.Int32 > (int)200) { @@ -395,8 +391,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); } - - // Number (decimal) maximum if(this.Number > (decimal)543.2) { @@ -409,8 +403,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" }); } - - // Float (float) maximum if(this.Float > (float)987.6) { @@ -423,8 +415,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" }); } - - // Double (double) maximum if(this.Double > (double)123.4) { @@ -437,8 +427,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); } - - // String (string) pattern Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) @@ -446,8 +434,6 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); } - - // Password (string) maxLength if(this.Password != null && this.Password.Length > 64) { @@ -459,7 +445,7 @@ public override int GetHashCode() { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" }); } - + yield break; } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs index 83f3b0a7b66d..4b8e41dc2a13 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs @@ -505,7 +505,6 @@ public static string SanitizeFilename(string filename) /// Convert params to key/value pairs. /// Use collectionFormat to properly format lists and collections. /// - /// Collection format. /// Key name. /// Value object. /// A list of KeyValuePairs diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs index e0b9c8bbe2f9..42d7e6b373c0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs @@ -2403,7 +2403,7 @@ public async System.Threading.Tasks.Task> TestClientMod if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter + if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.ParameterToString(enumFormStringArray)); // form parameter if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs index 83f3b0a7b66d..4b8e41dc2a13 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs @@ -505,7 +505,6 @@ public static string SanitizeFilename(string filename) /// Convert params to key/value pairs. /// Use collectionFormat to properly format lists and collections. /// - /// Collection format. /// Key name. /// Value object. /// A list of KeyValuePairs diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs index d739d62f0a98..3749f51f3f9e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs @@ -2403,7 +2403,7 @@ public async System.Threading.Tasks.Task> TestClientMod if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter + if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.ParameterToString(enumFormStringArray)); // form parameter if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs index 9ccb39dfeedd..4d536076615e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs @@ -500,7 +500,6 @@ public static string SanitizeFilename(string filename) /// Convert params to key/value pairs. /// Use collectionFormat to properly format lists and collections. /// - /// Collection format. /// Key name. /// Value object. /// A list of KeyValuePairs diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs index b3ebc9f373b9..d8452eb07cb6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs @@ -390,8 +390,6 @@ public virtual void OnPropertyChanged(string propertyName) /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - - // Integer (int) maximum if(this.Integer > (int)100) { @@ -404,8 +402,6 @@ public virtual void OnPropertyChanged(string propertyName) yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); } - - // Int32 (int) maximum if(this.Int32 > (int)200) { @@ -418,8 +414,6 @@ public virtual void OnPropertyChanged(string propertyName) yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); } - - // Number (decimal) maximum if(this.Number > (decimal)543.2) { @@ -432,8 +426,6 @@ public virtual void OnPropertyChanged(string propertyName) yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" }); } - - // Float (float) maximum if(this.Float > (float)987.6) { @@ -446,8 +438,6 @@ public virtual void OnPropertyChanged(string propertyName) yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" }); } - - // Double (double) maximum if(this.Double > (double)123.4) { @@ -460,8 +450,6 @@ public virtual void OnPropertyChanged(string propertyName) yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); } - - // String (string) pattern Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) @@ -469,8 +457,6 @@ public virtual void OnPropertyChanged(string propertyName) yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); } - - // Password (string) maxLength if(this.Password != null && this.Password.Length > 64) { @@ -482,7 +468,7 @@ public virtual void OnPropertyChanged(string propertyName) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" }); } - + yield break; } } From 635d176810bbf98d26ffd8fbcc72e0dda29505df Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 27 Apr 2020 21:15:38 +0800 Subject: [PATCH 9/9] update csharp samples --- .../src/Org.OpenAPITools/Model/EnumTest.cs | 2 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 2 +- .../src/Org.OpenAPITools/Client/ApiClient.cs | 1 + .../src/Org.OpenAPITools/Model/FormatTest.cs | 16 +++++++++++++++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/EnumTest.cs index 595a92331504..eb028bacfb5b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -159,7 +159,7 @@ protected EnumTest() { } /// enumInteger. /// enumNumber. /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum outerEnum = default(OuterEnum)) + public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) { this.EnumStringRequired = enumStringRequired; this.EnumString = enumString; diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index 3749f51f3f9e..d739d62f0a98 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -2403,7 +2403,7 @@ public async System.Threading.Tasks.Task> TestClientMod if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.ParameterToString(enumFormStringArray)); // form parameter + if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs index 4d536076615e..9ccb39dfeedd 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -500,6 +500,7 @@ public static string SanitizeFilename(string filename) /// Convert params to key/value pairs. /// Use collectionFormat to properly format lists and collections. /// + /// Collection format. /// Key name. /// Value object. /// A list of KeyValuePairs diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs index becce06e2006..0346d447e435 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -367,6 +367,8 @@ public override int GetHashCode() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { + + // Integer (int) maximum if(this.Integer > (int)100) { @@ -379,6 +381,8 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); } + + // Int32 (int) maximum if(this.Int32 > (int)200) { @@ -391,6 +395,8 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); } + + // Number (decimal) maximum if(this.Number > (decimal)543.2) { @@ -403,6 +409,8 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" }); } + + // Float (float) maximum if(this.Float > (float)987.6) { @@ -415,6 +423,8 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" }); } + + // Double (double) maximum if(this.Double > (double)123.4) { @@ -427,6 +437,8 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); } + + // String (string) pattern Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) @@ -434,6 +446,8 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); } + + // Password (string) maxLength if(this.Password != null && this.Password.Length > 64) { @@ -445,7 +459,7 @@ public override int GetHashCode() { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" }); } - + yield break; } }