diff --git a/samples/client/petstore/csharp/SwaggerClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/SwaggerClient/.openapi-generator/VERSION index 855ff9501eb8..096bf47efe31 100644 --- a/samples/client/petstore/csharp/SwaggerClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/SwaggerClient/.openapi-generator/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md index 7cd60c36767b..92221df7c70b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClient/README.md @@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c - API version: 1.0.0 - SDK version: 1.0.0 -- Build package: io.swagger.codegen.languages.CSharpClientCodegen +- Build package: org.openapitools.codegen.languages.CSharpClientCodegen ## Frameworks supported @@ -71,12 +71,12 @@ namespace Example { var apiInstance = new AnotherFakeApi(); - var body = new ModelClient(); // ModelClient | client model + var modelClient = new ModelClient(); // ModelClient | client model try { // To test special tags - ModelClient result = apiInstance.TestSpecialTags(body); + ModelClient result = apiInstance.TestSpecialTags(modelClient); Debug.WriteLine(result); } catch (Exception e) @@ -101,6 +101,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | *FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | *FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters @@ -134,14 +135,15 @@ Class | Method | HTTP request | Description - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Model.Animal](docs/Animal.md) - - [Model.AnimalFarm](docs/AnimalFarm.md) - [Model.ApiResponse](docs/ApiResponse.md) - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) - [Model.Capitalization](docs/Capitalization.md) + - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.ClassModel](docs/ClassModel.md) + - [Model.Dog](docs/Dog.md) - [Model.EnumArrays](docs/EnumArrays.md) - [Model.EnumClass](docs/EnumClass.md) - [Model.EnumTest](docs/EnumTest.md) @@ -155,19 +157,14 @@ Class | Method | HTTP request | Description - [Model.Name](docs/Name.md) - [Model.NumberOnly](docs/NumberOnly.md) - [Model.Order](docs/Order.md) - - [Model.OuterBoolean](docs/OuterBoolean.md) - [Model.OuterComposite](docs/OuterComposite.md) - [Model.OuterEnum](docs/OuterEnum.md) - - [Model.OuterNumber](docs/OuterNumber.md) - - [Model.OuterString](docs/OuterString.md) - [Model.Pet](docs/Pet.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.Return](docs/Return.md) - [Model.SpecialModelName](docs/SpecialModelName.md) - [Model.Tag](docs/Tag.md) - [Model.User](docs/User.md) - - [Model.Cat](docs/Cat.md) - - [Model.Dog](docs/Dog.md) diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/AnotherFakeApi.md index 89bc406754a8..4c3ed5e88548 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/AnotherFakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/AnotherFakeApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **TestSpecialTags** -> ModelClient TestSpecialTags (ModelClient body) +> ModelClient TestSpecialTags (ModelClient modelClient) To test special tags @@ -30,12 +30,12 @@ namespace Example public void main() { var apiInstance = new AnotherFakeApi(); - var body = new ModelClient(); // ModelClient | client model + var modelClient = new ModelClient(); // ModelClient | client model try { // To test special tags - ModelClient result = apiInstance.TestSpecialTags(body); + ModelClient result = apiInstance.TestSpecialTags(modelClient); Debug.WriteLine(result); } catch (Exception e) @@ -51,7 +51,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/EnumTest.md b/samples/client/petstore/csharp/SwaggerClient/docs/EnumTest.md index 5b38bb5b3a58..f3278be4cf3e 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/EnumTest.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/EnumTest.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumString** | **string** | | [optional] +**EnumStringRequired** | **string** | | **EnumInteger** | **int?** | | [optional] **EnumNumber** | **double?** | | [optional] **OuterEnum** | **OuterEnum** | | [optional] diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md index 8858b6bf7c40..61fffcfaa61a 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model [**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters @@ -17,7 +18,7 @@ Method | HTTP request | Description # **FakeOuterBooleanSerialize** -> OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null) +> bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null) @@ -38,11 +39,11 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional) + var booleanPostBody = true; // bool? | Input boolean as post body (optional) try { - OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body); + bool? result = apiInstance.FakeOuterBooleanSerialize(booleanPostBody); Debug.WriteLine(result); } catch (Exception e) @@ -58,11 +59,11 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body | [optional] + **booleanPostBody** | **bool?**| Input boolean as post body | [optional] ### Return type -[**OuterBoolean**](OuterBoolean.md) +**bool?** ### Authorization @@ -71,13 +72,13 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) +> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) @@ -98,11 +99,11 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) + var outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body (optional) try { - OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body); + OuterComposite result = apiInstance.FakeOuterCompositeSerialize(outerComposite); Debug.WriteLine(result); } catch (Exception e) @@ -118,7 +119,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -131,13 +132,13 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FakeOuterNumberSerialize** -> OuterNumber FakeOuterNumberSerialize (OuterNumber body = null) +> decimal? FakeOuterNumberSerialize (decimal? body = null) @@ -158,11 +159,11 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new OuterNumber(); // OuterNumber | Input number as post body (optional) + var body = 1.2; // decimal? | Input number as post body (optional) try { - OuterNumber result = apiInstance.FakeOuterNumberSerialize(body); + decimal? result = apiInstance.FakeOuterNumberSerialize(body); Debug.WriteLine(result); } catch (Exception e) @@ -178,11 +179,11 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OuterNumber**](OuterNumber.md)| Input number as post body | [optional] + **body** | **decimal?**| Input number as post body | [optional] ### Return type -[**OuterNumber**](OuterNumber.md) +**decimal?** ### Authorization @@ -191,13 +192,13 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FakeOuterStringSerialize** -> OuterString FakeOuterStringSerialize (OuterString body = null) +> string FakeOuterStringSerialize (string body = null) @@ -218,11 +219,11 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new OuterString(); // OuterString | Input string as post body (optional) + var body = body_example; // string | Input string as post body (optional) try { - OuterString result = apiInstance.FakeOuterStringSerialize(body); + string result = apiInstance.FakeOuterStringSerialize(body); Debug.WriteLine(result); } catch (Exception e) @@ -238,11 +239,11 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OuterString**](OuterString.md)| Input string as post body | [optional] + **body** | **string**| Input string as post body | [optional] ### Return type -[**OuterString**](OuterString.md) +**string** ### Authorization @@ -251,13 +252,72 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestBodyWithQueryParams** +> void TestBodyWithQueryParams (string query, User user) + + + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class TestBodyWithQueryParamsExample + { + public void main() + { + var apiInstance = new FakeApi(); + var query = query_example; // string | + var user = new User(); // User | + + try + { + apiInstance.TestBodyWithQueryParams(query, user); + } + catch (Exception e) + { + Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **string**| | + **user** | [**User**](User.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestClientModel** -> ModelClient TestClientModel (ModelClient body) +> ModelClient TestClientModel (ModelClient modelClient) To test \"client\" model @@ -278,12 +338,12 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new ModelClient(); // ModelClient | client model + var modelClient = new ModelClient(); // ModelClient | client model try { // To test \"client\" model - ModelClient result = apiInstance.TestClientModel(body); + ModelClient result = apiInstance.TestClientModel(modelClient); Debug.WriteLine(result); } catch (Exception e) @@ -299,7 +359,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type @@ -318,7 +378,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, byte[] 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 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -346,13 +406,13 @@ namespace Example var number = 8.14; // decimal? | None var _double = 1.2; // double? | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = B; // byte[] | 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.4; // float? | None (optional) var _string = _string_example; // string | None (optional) - var binary = B; // byte[] | 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 password = password_example; // string | None (optional) @@ -385,7 +445,7 @@ Name | Type | Description | Notes **int64** | **long?**| None | [optional] **_float** | **float?**| None | [optional] **_string** | **string**| None | [optional] - **binary** | **byte[]**| None | [optional] + **binary** | **System.IO.Stream****System.IO.Stream**| None | [optional] **date** | **DateTime?**| None | [optional] **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] @@ -401,14 +461,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 - - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestEnumParameters** -> void TestEnumParameters (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = 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 @@ -429,19 +489,19 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) 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.2; // double? | Query parameter enum test (double) (optional) + var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) + var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (Exception e) { @@ -456,14 +516,14 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] - **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] **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] + **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] + **enumFormString** | **string**| Form parameter enum test (string) | [optional] ### Return type @@ -475,14 +535,14 @@ No authorization required ### HTTP request headers - - **Content-Type**: */* - - **Accept**: */* + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestInlineAdditionalProperties** -> void TestInlineAdditionalProperties (Object param) +> void TestInlineAdditionalProperties (string requestBody) test inline additionalProperties @@ -501,12 +561,12 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var param = ; // Object | request body + var requestBody = new string(); // string | request body try { // test inline additionalProperties - apiInstance.TestInlineAdditionalProperties(param); + apiInstance.TestInlineAdditionalProperties(requestBody); } catch (Exception e) { @@ -521,7 +581,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **param** | **Object**| request body | + **requestBody** | [**string**](string.md)| request body | ### Return type @@ -593,7 +653,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeClassnameTags123Api.md index 5f1d0ca776b4..8474cc2078d8 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeClassnameTags123Api.md @@ -9,7 +9,9 @@ Method | HTTP request | Description # **TestClassname** -> ModelClient TestClassname (ModelClient body) +> ModelClient TestClassname (ModelClient modelClient) + +To test class name in snake case To test class name in snake case @@ -33,12 +35,12 @@ namespace Example // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); var apiInstance = new FakeClassnameTags123Api(); - var body = new ModelClient(); // ModelClient | client model + var modelClient = new ModelClient(); // ModelClient | client model try { // To test class name in snake case - ModelClient result = apiInstance.TestClassname(body); + ModelClient result = apiInstance.TestClassname(modelClient); Debug.WriteLine(result); } catch (Exception e) @@ -54,7 +56,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FormatTest.md b/samples/client/petstore/csharp/SwaggerClient/docs/FormatTest.md index 1108a1af428b..c2127b35b633 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/FormatTest.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **Double** | **double?** | | [optional] **String** | **string** | | [optional] **Byte** | **byte[]** | | -**Binary** | **byte[]** | | [optional] +**Binary** | **System.IO.Stream** | | [optional] **Date** | **DateTime?** | | **DateTime** | **DateTime?** | | [optional] **Uuid** | **Guid?** | | [optional] diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/OuterComposite.md b/samples/client/petstore/csharp/SwaggerClient/docs/OuterComposite.md index 41fae66f1363..84714b7759e3 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/OuterComposite.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/OuterComposite.md @@ -3,9 +3,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MyNumber** | [**OuterNumber**](OuterNumber.md) | | [optional] -**MyString** | [**OuterString**](OuterString.md) | | [optional] -**MyBoolean** | [**OuterBoolean**](OuterBoolean.md) | | [optional] +**MyNumber** | **decimal?** | | [optional] +**MyString** | **string** | | [optional] +**MyBoolean** | **bool?** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md index 44f7fad83261..013c6e2a412e 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **AddPet** -> void AddPet (Pet body) +> void AddPet (Pet pet) Add a new pet to the store @@ -38,12 +38,12 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(); - var body = new Pet(); // Pet | Pet object that needs to be added to the store + var pet = new Pet(); // Pet | Pet object that needs to be added to the store try { // Add a new pet to the store - apiInstance.AddPet(body); + apiInstance.AddPet(pet); } catch (Exception e) { @@ -58,7 +58,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -71,7 +71,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json, application/xml - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -134,7 +134,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -334,7 +334,7 @@ Name | Type | Description | Notes # **UpdatePet** -> void UpdatePet (Pet body) +> void UpdatePet (Pet pet) Update an existing pet @@ -356,12 +356,12 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(); - var body = new Pet(); // Pet | Pet object that needs to be added to the store + var pet = new Pet(); // Pet | Pet object that needs to be added to the store try { // Update an existing pet - apiInstance.UpdatePet(body); + apiInstance.UpdatePet(pet); } catch (Exception e) { @@ -376,7 +376,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -389,7 +389,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json, application/xml - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -454,7 +454,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -484,7 +484,7 @@ namespace Example var apiInstance = new PetApi(); var petId = 789; // long? | ID of pet to update var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = new System.IO.Stream(); // System.IO.Stream | file to upload (optional) + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) try { @@ -507,7 +507,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **long?**| ID of pet to update | **additionalMetadata** | **string**| Additional data to pass to server | [optional] - **file** | **System.IO.Stream**| file to upload | [optional] + **file** | **System.IO.Stream****System.IO.Stream**| file to upload | [optional] ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md index 28e3fe590676..1603b33bcbad 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md @@ -66,7 +66,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -195,7 +195,7 @@ No authorization required # **PlaceOrder** -> Order PlaceOrder (Order body) +> Order PlaceOrder (Order order) Place an order for a pet @@ -214,12 +214,12 @@ namespace Example public void main() { var apiInstance = new StoreApi(); - var body = new Order(); // Order | order placed for purchasing the pet + var order = new Order(); // Order | order placed for purchasing the pet try { // Place an order for a pet - Order result = apiInstance.PlaceOrder(body); + Order result = apiInstance.PlaceOrder(order); Debug.WriteLine(result); } catch (Exception e) @@ -235,7 +235,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | + **order** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md index fd9bfb0e9732..1513014cb0c0 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **CreateUser** -> void CreateUser (User body) +> void CreateUser (User user) Create user @@ -37,12 +37,12 @@ namespace Example public void main() { var apiInstance = new UserApi(); - var body = new User(); // User | Created user object + var user = new User(); // User | Created user object try { // Create user - apiInstance.CreateUser(body); + apiInstance.CreateUser(user); } catch (Exception e) { @@ -57,7 +57,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | + **user** | [**User**](User.md)| Created user object | ### Return type @@ -70,13 +70,13 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateUsersWithArrayInput** -> void CreateUsersWithArrayInput (List body) +> void CreateUsersWithArrayInput (List user) Creates list of users with given input array @@ -95,12 +95,12 @@ namespace Example public void main() { var apiInstance = new UserApi(); - var body = new List(); // List | List of user object + var user = new List(); // List | List of user object try { // Creates list of users with given input array - apiInstance.CreateUsersWithArrayInput(body); + apiInstance.CreateUsersWithArrayInput(user); } catch (Exception e) { @@ -115,7 +115,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | + **user** | [**List<User>**](List.md)| List of user object | ### Return type @@ -128,13 +128,13 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateUsersWithListInput** -> void CreateUsersWithListInput (List body) +> void CreateUsersWithListInput (List user) Creates list of users with given input array @@ -153,12 +153,12 @@ namespace Example public void main() { var apiInstance = new UserApi(); - var body = new List(); // List | List of user object + var user = new List(); // List | List of user object try { // Creates list of users with given input array - apiInstance.CreateUsersWithListInput(body); + apiInstance.CreateUsersWithListInput(user); } catch (Exception e) { @@ -173,7 +173,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | + **user** | [**List<User>**](List.md)| List of user object | ### Return type @@ -186,7 +186,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -246,7 +246,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -271,7 +271,7 @@ namespace Example public void main() { var apiInstance = new UserApi(); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -292,7 +292,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | + **username** | **string**| The name that needs to be fetched. Use user1 for testing. | ### Return type @@ -420,13 +420,13 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateUser** -> void UpdateUser (string username, User body) +> void UpdateUser (string username, User user) Updated user @@ -448,12 +448,12 @@ namespace Example { var apiInstance = new UserApi(); var username = username_example; // string | name that need to be deleted - var body = new User(); // User | Updated user object + var user = new User(); // User | Updated user object try { // Updated user - apiInstance.UpdateUser(username, body); + apiInstance.UpdateUser(username, user); } catch (Exception e) { @@ -469,7 +469,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **string**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | + **user** | [**User**](User.md)| Updated user object | ### Return type @@ -482,7 +482,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs index 34c1fb71f44c..67476f9242e7 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs @@ -1,13 +1,3 @@ -/* - * Swagger Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - using System; using System.IO; using System.Collections.Generic; @@ -23,148 +13,312 @@ using IO.Swagger.Model; namespace IO.Swagger.Test { - /// - /// Class for testing PetApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class PetApiTests - { - private PetApi instance; + /// + /// Class for testing PetApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class PetApiTests + { + private PetApi instance; - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new PetApi(); - } + private long petId = 11088; - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { + /// + /// Create a Pet object + /// + private Pet createPet() + { + // create pet + Pet p = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); + p.Id = petId; + //p.Name = "Csharp test"; + p.Status = Pet.StatusEnum.Available; + // create Category object + Category category = new Category(); + category.Id = 56; + category.Name = "sample category name2"; + List photoUrls = new List(new String[] { "sample photoUrls" }); + // create Tag object + Tag tag = new Tag(); + tag.Id = petId; + tag.Name = "csharp sample tag name1"; + List tags = new List(new Tag[] { tag }); + p.Tags = tags; + p.Category = category; + p.PhotoUrls = photoUrls; - } + return p; + } - /// - /// Test an instance of PetApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' PetApi - //Assert.IsInstanceOfType(typeof(PetApi), instance, "instance is a PetApi"); - } + /// + /// Convert string to byte array + /// + private byte[] GetBytes(string str) + { + byte[] bytes = new byte[str.Length * sizeof(char)]; + System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length); + return bytes; + } - - /// - /// Test AddPet - /// - [Test] - public void AddPetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.AddPet(body); - - } - - /// - /// Test DeletePet - /// - [Test] - public void DeletePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long? petId = null; - //string apiKey = null; - //instance.DeletePet(petId, apiKey); - - } - - /// - /// Test FindPetsByStatus - /// - [Test] - public void FindPetsByStatusTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List status = null; - //var response = instance.FindPetsByStatus(status); - //Assert.IsInstanceOf> (response, "response is List"); - } - - /// - /// Test FindPetsByTags - /// - [Test] - public void FindPetsByTagsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List tags = null; - //var response = instance.FindPetsByTags(tags); - //Assert.IsInstanceOf> (response, "response is List"); - } - - /// - /// Test GetPetById - /// - [Test] - public void GetPetByIdTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long? petId = null; - //var response = instance.GetPetById(petId); - //Assert.IsInstanceOf (response, "response is Pet"); - } - - /// - /// Test UpdatePet - /// - [Test] - public void UpdatePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.UpdatePet(body); - - } - - /// - /// Test UpdatePetWithForm - /// - [Test] - public void UpdatePetWithFormTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long? petId = null; - //string name = null; - //string status = null; - //instance.UpdatePetWithForm(petId, name, status); - - } - - /// - /// Test UploadFile - /// - [Test] - public void UploadFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long? petId = null; - //string additionalMetadata = null; - //System.IO.Stream file = null; - //var response = instance.UploadFile(petId, additionalMetadata, file); - //Assert.IsInstanceOf (response, "response is ApiResponse"); - } - - } + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new PetApi(); -} + // create pet + Pet p = createPet(); + + // add pet before testing + PetApi petApi = new PetApi("http://petstore.swagger.io/v2/"); + petApi.AddPet(p); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + // remove the pet after testing + PetApi petApi = new PetApi(); + petApi.DeletePet(petId, "test key"); + } + + /// + /// Test an instance of PetApi + /// + [Test] + public void InstanceTest() + { + Assert.IsInstanceOf(instance); + } + + + /// + /// Test AddPet + /// + [Test] + public void AddPetTest() + { + // create pet + Pet p = createPet(); + instance.AddPet(p); + } + + /// + /// Test DeletePet + /// + [Test] + public void DeletePetTest() + { + // no need to test as it'c covered by Cleanup() already + } + + /// + /// Test FindPetsByStatus + /// + [Test] + public void FindPetsByStatusTest() + { + PetApi petApi = new PetApi(); + List tagsList = new List(new String[] { "available" }); + + List listPet = petApi.FindPetsByTags(tagsList); + foreach (Pet pet in listPet) // Loop through List with foreach. + { + Assert.IsInstanceOf(pet); + Assert.AreEqual("csharp sample tag name1", pet.Tags[0]); + } + } + + /// + /// Test FindPetsByTags + /// + [Test] + public void FindPetsByTagsTest() + { + List tags = new List(new String[] { "pet" }); + var response = instance.FindPetsByTags(tags); + Assert.IsInstanceOf>(response); + } + + /// + /// Test GetPetById + /// + [Test] + public void GetPetByIdTest() + { + // set timeout to 10 seconds + Configuration c1 = new Configuration(); + c1.Timeout = 10000; + c1.UserAgent = "TEST_USER_AGENT"; + + PetApi petApi = new PetApi(c1); + Pet response = petApi.GetPetById(petId); + Assert.IsInstanceOf(response); + + Assert.AreEqual("Csharp test", response.Name); + Assert.AreEqual(Pet.StatusEnum.Available, response.Status); + + Assert.IsInstanceOf>(response.Tags); + Assert.AreEqual(petId, response.Tags[0].Id); + Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name); + + Assert.IsInstanceOf>(response.PhotoUrls); + Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]); + + Assert.IsInstanceOf(response.Category); + Assert.AreEqual(56, response.Category.Id); + Assert.AreEqual("sample category name2", response.Category.Name); + } + + /// + /// Test GetPetByIdAsync + /// + [Test()] + public void TestGetPetByIdAsync() + { + PetApi petApi = new PetApi(); + var task = petApi.GetPetByIdAsync(petId); + Pet response = task.Result; + Assert.IsInstanceOf(response); + + Assert.AreEqual("Csharp test", response.Name); + Assert.AreEqual(Pet.StatusEnum.Available, response.Status); + + Assert.IsInstanceOf>(response.Tags); + Assert.AreEqual(petId, response.Tags[0].Id); + Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name); + + Assert.IsInstanceOf>(response.PhotoUrls); + Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]); + + Assert.IsInstanceOf(response.Category); + Assert.AreEqual(56, response.Category.Id); + Assert.AreEqual("sample category name2", response.Category.Name); + } + + /// + /// Test GetPetByIdAsyncWithHttpInfo + /// + [Test()] + public void TestGetPetByIdAsyncWithHttpInfo() + { + PetApi petApi = new PetApi(); + var task = petApi.GetPetByIdAsyncWithHttpInfo(petId); + + Assert.AreEqual(200, task.Result.StatusCode); + Assert.IsTrue(task.Result.Headers.ContainsKey("Content-Type")); + Assert.AreEqual(task.Result.Headers["Content-Type"], "application/json"); + + Pet response = task.Result.Data; + Assert.IsInstanceOf(response); + + Assert.AreEqual("Csharp test", response.Name); + Assert.AreEqual(Pet.StatusEnum.Available, response.Status); + + Assert.IsInstanceOf>(response.Tags); + Assert.AreEqual(petId, response.Tags[0].Id); + Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name); + + Assert.IsInstanceOf>(response.PhotoUrls); + Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]); + + Assert.IsInstanceOf(response.Category); + Assert.AreEqual(56, response.Category.Id); + Assert.AreEqual("sample category name2", response.Category.Name); + } + + /// + /// Test UpdatePet + /// + [Test] + public void UpdatePetTest() + { + // create pet + Pet p = createPet(); + instance.UpdatePet(p); + } + + /// + /// Test UpdatePetWithForm + /// + [Test] + public void UpdatePetWithFormTest() + { + PetApi petApi = new PetApi(); + petApi.UpdatePetWithForm(petId, "new form name", "pending"); + + Pet response = petApi.GetPetById(petId); + Assert.IsInstanceOf(response); + Assert.IsInstanceOf(response.Category); + Assert.IsInstanceOf>(response.Tags); + + Assert.AreEqual("new form name", response.Name); + Assert.AreEqual(Pet.StatusEnum.Pending, response.Status); + + Assert.AreEqual(petId, response.Tags[0].Id); + Assert.AreEqual(56, response.Category.Id); + + // test optional parameter + petApi.UpdatePetWithForm(petId, "new form name2"); + Pet response2 = petApi.GetPetById(petId); + Assert.AreEqual("new form name2", response2.Name); + } + + /// + /// Test UploadFile + /// + [Test] + public void UploadFileTest() + { + Assembly _assembly = Assembly.GetExecutingAssembly(); + Stream _imageStream = _assembly.GetManifestResourceStream("IO.Swagger.Test.linux-logo.png"); + PetApi petApi = new PetApi(); + // test file upload with form parameters + petApi.UploadFile(petId, "new form name", _imageStream); + + // test file upload without any form parameters + // using optional parameter syntax introduced at .net 4.0 + petApi.UploadFile(petId: petId, file: _imageStream); + + } + + /// + /// Test status code + /// + [Test()] + public void TestStatusCodeAndHeader() + { + PetApi petApi = new PetApi(); + var response = petApi.GetPetByIdWithHttpInfo(petId); + Assert.AreEqual(response.StatusCode, 200); + Assert.IsTrue(response.Headers.ContainsKey("Content-Type")); + Assert.AreEqual(response.Headers["Content-Type"], "application/json"); + } + + /// + /// Test default header (should be deprecated + /// + [Test()] + public void TestDefaultHeader() + { + PetApi petApi = new PetApi(); + // commented out the warning test below as it's confirmed the warning is working as expected + // there should be a warning for using AddDefaultHeader (deprecated) below + //petApi.AddDefaultHeader ("header_key", "header_value"); + // the following should be used instead as suggested in the doc + petApi.Configuration.AddDefaultHeader("header_key2", "header_value2"); + + } + + } + +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Client/ApiClientTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Client/ApiClientTests.cs new file mode 100644 index 000000000000..238a9f1aa8f9 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Client/ApiClientTests.cs @@ -0,0 +1,139 @@ +using NUnit.Framework; +using System; +using System.Collections.Generic; +using IO.Swagger.Client; +using IO.Swagger.Api; +using IO.Swagger.Model; + +namespace IO.Swagger.Test +{ + public class ApiClientTests + { + public ApiClientTests() + { + } + + [TearDown()] + public void TearDown() + { + // Reset to default, just in case + Configuration.Default.DateTimeFormat = "o"; + } + + /// + /// Test SelectHeaderContentType + /// + [Test()] + public void TestSelectHeaderContentType() + { + ApiClient api = new ApiClient(); + String[] contentTypes = new String[] { "application/json", "application/xml" }; + Assert.AreEqual("application/json", api.SelectHeaderContentType(contentTypes)); + + contentTypes = new String[] { "application/xml" }; + Assert.AreEqual("application/xml", api.SelectHeaderContentType(contentTypes)); + + contentTypes = new String[] { }; + Assert.AreEqual("application/json", api.SelectHeaderContentType(contentTypes)); + } + + /// + /// Test ParameterToString + /// + [Test()] + public void TestParameterToString() + { + ApiClient api = new ApiClient(); + + // test array of string + List statusList = new List(new String[] { "available", "sold" }); + Assert.AreEqual("available,sold", api.ParameterToString(statusList)); + + // test array of int + List numList = new List(new int[] { 1, 37 }); + Assert.AreEqual("1,37", api.ParameterToString(numList)); + } + + [Test()] + public void TestParameterToStringForDateTime() + { + ApiClient api = new ApiClient(); + + // test datetime + DateTime dateUtc = DateTime.Parse("2008-04-10T13:30:00.0000000z", null, System.Globalization.DateTimeStyles.RoundtripKind); + Assert.AreEqual("2008-04-10T13:30:00.0000000Z", api.ParameterToString(dateUtc)); + + // test datetime with no timezone + DateTime dateWithNoTz = DateTime.Parse("2008-04-10T13:30:00.000", null, System.Globalization.DateTimeStyles.RoundtripKind); + Assert.AreEqual("2008-04-10T13:30:00.0000000", api.ParameterToString(dateWithNoTz)); + } + + // The test below only passes when running at -04:00 timezone + [Ignore()] + public void TestParameterToStringWithTimeZoneForDateTime() + { + ApiClient api = new ApiClient(); + // test datetime with a time zone + DateTimeOffset dateWithTz = DateTimeOffset.Parse("2008-04-10T13:30:00.0000000-04:00", null, System.Globalization.DateTimeStyles.RoundtripKind); + Assert.AreEqual("2008-04-10T13:30:00.0000000-04:00", api.ParameterToString(dateWithTz)); + } + + [Test()] + public void TestParameterToStringForDateTimeWithUFormat() + { + // Setup the DateTimeFormat across all of the calls + Configuration.Default.DateTimeFormat = "u"; + ApiClient api = new ApiClient(); + + // test datetime + DateTime dateUtc = DateTime.Parse("2009-06-15 20:45:30Z", null, System.Globalization.DateTimeStyles.RoundtripKind); + Assert.AreEqual("2009-06-15 20:45:30Z", api.ParameterToString(dateUtc)); + } + + [Test()] + public void TestParameterToStringForDateTimeWithCustomFormat() + { + // Setup the DateTimeFormat across all of the calls + Configuration.Default.DateTimeFormat = "dd/MM/yy HH:mm:ss"; + ApiClient api = new ApiClient(); + + // test datetime + DateTime dateUtc = DateTime.Parse("2009-06-15 20:45:30Z", null, System.Globalization.DateTimeStyles.RoundtripKind); + Assert.AreEqual("15/06/09 20:45:30", api.ParameterToString(dateUtc)); + } + + [Test()] + public void TestSanitizeFilename() + { + Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("sun.gif")); + Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("../sun.gif")); + Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("/var/tmp/sun.gif")); + Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("./sun.gif")); + + Assert.AreEqual("sun", ApiClient.SanitizeFilename("sun")); + Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("..\\sun.gif")); + Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("\\var\\tmp\\sun.gif")); + Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("c:\\var\\tmp\\sun.gif")); + Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename(".\\sun.gif")); + + } + + [Test()] + public void TestApiClientInstance() + { + PetApi p1 = new PetApi(); + PetApi p2 = new PetApi(); + + Configuration c1 = new Configuration(); // using default ApiClient + PetApi p3 = new PetApi(c1); + + // ensure both using the same default ApiClient + Assert.AreSame(p1.Configuration.ApiClient, p2.Configuration.ApiClient); + Assert.AreSame(p1.Configuration.ApiClient, Configuration.Default.ApiClient); + + // ensure both using the same default ApiClient + Assert.AreSame(p3.Configuration.ApiClient, c1.ApiClient); + + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Client/ConfigurationTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Client/ConfigurationTests.cs new file mode 100644 index 000000000000..dc253763f625 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Client/ConfigurationTests.cs @@ -0,0 +1,111 @@ +using NUnit.Framework; +using System; +using System.Collections.Generic; +using IO.Swagger.Client; +using IO.Swagger.Api; +using IO.Swagger.Model; + +namespace IO.Swagger.Test +{ + public class ConfigurationTests + { + public ConfigurationTests() + { + } + + [TearDown()] + public void TearDown() + { + // Reset to default, just in case + Configuration.Default.DateTimeFormat = "o"; + } + + [Test()] + public void TestAuthentication() + { + Configuration c = new Configuration(); + c.Username = "test_username"; + c.Password = "test_password"; + + c.ApiKey["api_key_identifier"] = "1233456778889900"; + c.ApiKeyPrefix["api_key_identifier"] = "PREFIX"; + Assert.AreEqual(c.GetApiKeyWithPrefix("api_key_identifier"), "PREFIX 1233456778889900"); + + } + + [Test()] + public void TestBasePath() + { + PetApi p = new PetApi("http://new-basepath.com"); + Assert.AreEqual(p.Configuration.ApiClient.RestClient.BaseUrl, "http://new-basepath.com"); + // Given that PetApi is initailized with a base path, a new configuration (with a new ApiClient) + // is created by default + Assert.AreNotSame(p.Configuration, Configuration.Default); + } + + [Test()] + public void TestDateTimeFormat_Default() + { + // Should default to the Round-trip Format Specifier - "o" + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + Assert.AreEqual("o", Configuration.Default.DateTimeFormat); + } + + [Test()] + public void TestDateTimeFormat_UType() + { + Configuration.Default.DateTimeFormat = "u"; + + Assert.AreEqual("u", Configuration.Default.DateTimeFormat); + } + + [Test()] + public void TestDefautlConfiguration() + { + PetApi p1 = new PetApi(); + PetApi p2 = new PetApi(); + Assert.AreSame(p1.Configuration, p2.Configuration); + // same as the default + Assert.AreSame(p1.Configuration, Configuration.Default); + + Configuration c = new Configuration(); + Assert.AreNotSame(c, p1.Configuration); + + PetApi p3 = new PetApi(c); + // same as c + Assert.AreSame(p3.Configuration, c); + // not same as default + Assert.AreNotSame(p3.Configuration, p1.Configuration); + + } + + [Test()] + public void TestUsage() + { + // basic use case using default base URL + PetApi p1 = new PetApi(); + Assert.AreSame(p1.Configuration, Configuration.Default, "PetApi should use default configuration"); + + // using a different base URL + PetApi p2 = new PetApi("http://new-base-url.com/"); + Assert.AreEqual(p2.Configuration.ApiClient.RestClient.BaseUrl.ToString(), "http://new-base-url.com/"); + + // using a different configuration + Configuration c1 = new Configuration(); + PetApi p3 = new PetApi(c1); + Assert.AreSame(p3.Configuration, c1); + + } + + [Test()] + public void TestTimeout() + { + Configuration c1 = new Configuration(); + Assert.AreEqual(100000, c1.Timeout); // default vaue + + c1.Timeout = 50000; + Assert.AreEqual(50000, c1.Timeout); + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj index a1beb4578976..08506bce8210 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj @@ -72,8 +72,9 @@ Contact: apiteam@swagger.io - + + + @@ -85,5 +86,11 @@ Contact: apiteam@swagger.io IO.Swagger + + + + + + diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs index 89b221bde942..c71c8dc6cd93 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs @@ -1,14 +1,3 @@ -/* - * Swagger Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - - using NUnit.Framework; using System; @@ -19,102 +8,162 @@ using IO.Swagger.Api; using IO.Swagger.Model; using IO.Swagger.Client; using System.Reflection; -using Newtonsoft.Json; namespace IO.Swagger.Test { - /// - /// Class for testing Pet - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class PetTests - { - // TODO uncomment below to declare an instance variable for Pet - //private Pet instance; + /// + /// Class for testing Pet + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetTests + { + private Pet instance; - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Pet - //instance = new Pet(); - } + private long petId = 11088; - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); + } - } + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { - /// - /// Test an instance of Pet - /// - [Test] - public void PetInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" Pet - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Pet"); - } + } + /// + /// Test an instance of Pet + /// + [Test] + public void PetInstanceTest() + { + Assert.IsInstanceOfType(typeof(Pet), instance); + } - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Category' - /// - [Test] - public void CategoryTest() - { - // TODO unit test for the property 'Category' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'PhotoUrls' - /// - [Test] - public void PhotoUrlsTest() - { - // TODO unit test for the property 'PhotoUrls' - } - /// - /// Test the property 'Tags' - /// - [Test] - public void TagsTest() - { - // TODO unit test for the property 'Tags' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO: unit test for the property 'Id' + } + /// + /// Test the property 'Category' + /// + [Test] + public void CategoryTest() + { + // TODO: unit test for the property 'Category' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO: unit test for the property 'Name' + } + /// + /// Test the property 'PhotoUrls' + /// + [Test] + public void PhotoUrlsTest() + { + // TODO: unit test for the property 'PhotoUrls' + } + /// + /// Test the property 'Tags' + /// + [Test] + public void TagsTest() + { + // TODO: unit test for the property 'Tags' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO: unit test for the property 'Status' + } - } + /// + /// Test Equal + /// + [Test()] + public void TestEqual() + { + // create pet + Pet p1 = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); + p1.Id = petId; + //p1.Name = "Csharp test"; + p1.Status = Pet.StatusEnum.Available; + // create Category object + Category category1 = new Category(); + category1.Id = 56; + category1.Name = "sample category name2"; + List photoUrls1 = new List(new String[] { "sample photoUrls" }); + // create Tag object + Tag tag1 = new Tag(); + tag1.Id = petId; + tag1.Name = "csharp sample tag name1"; + List tags1 = new List(new Tag[] { tag1 }); + p1.Tags = tags1; + p1.Category = category1; + p1.PhotoUrls = photoUrls1; -} + // create pet 2 + Pet p2 = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); + p2.Id = petId; + p2.Name = "Csharp test"; + p2.Status = Pet.StatusEnum.Available; + // create Category object + Category category2 = new Category(); + category2.Id = 56; + category2.Name = "sample category name2"; + List photoUrls2 = new List(new String[] { "sample photoUrls" }); + // create Tag object + Tag tag2 = new Tag(); + tag2.Id = petId; + tag2.Name = "csharp sample tag name1"; + List tags2 = new List(new Tag[] { tag2 }); + p2.Tags = tags2; + p2.Category = category2; + p2.PhotoUrls = photoUrls2; + + // p1 and p2 should be equal (both object and attribute level) + Assert.IsTrue(category1.Equals(category2)); + Assert.IsTrue(tags1.SequenceEqual(tags2)); + Assert.IsTrue(p1.PhotoUrls.SequenceEqual(p2.PhotoUrls)); + + Assert.IsTrue(p1.Equals(p2)); + + // update attribute to that p1 and p2 are not equal + category2.Name = "new category name"; + Assert.IsFalse(category1.Equals(category2)); + + tags2 = new List(); + Assert.IsFalse(tags1.SequenceEqual(tags2)); + + // photoUrls has not changed so it should be equal + Assert.IsTrue(p1.PhotoUrls.SequenceEqual(p2.PhotoUrls)); + + Assert.IsFalse(p1.Equals(p2)); + } + } + +} \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/linux-logo.png b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/linux-logo.png new file mode 100644 index 000000000000..8269538b1aca Binary files /dev/null and b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/linux-logo.png differ diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/AnotherFakeApi.cs index b51073840f67..69cdd7b2b7c0 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/AnotherFakeApi.cs @@ -31,9 +31,9 @@ namespace IO.Swagger.Api /// To test special tags /// /// Thrown when fails to make API call - /// client model + /// client model /// ModelClient - ModelClient TestSpecialTags (ModelClient body); + ModelClient TestSpecialTags (ModelClient modelClient); /// /// To test special tags @@ -42,9 +42,9 @@ namespace IO.Swagger.Api /// To test special tags /// /// Thrown when fails to make API call - /// client model + /// client model /// ApiResponse of ModelClient - ApiResponse TestSpecialTagsWithHttpInfo (ModelClient body); + ApiResponse TestSpecialTagsWithHttpInfo (ModelClient modelClient); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -54,9 +54,9 @@ namespace IO.Swagger.Api /// To test special tags /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ModelClient - System.Threading.Tasks.Task TestSpecialTagsAsync (ModelClient body); + System.Threading.Tasks.Task TestSpecialTagsAsync (ModelClient modelClient); /// /// To test special tags @@ -65,9 +65,9 @@ namespace IO.Swagger.Api /// To test special tags /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestSpecialTagsAsyncWithHttpInfo (ModelClient body); + System.Threading.Tasks.Task> TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient); #endregion Asynchronous Operations } @@ -172,11 +172,11 @@ namespace IO.Swagger.Api /// To test special tags To test special tags /// /// Thrown when fails to make API call - /// client model + /// client model /// ModelClient - public ModelClient TestSpecialTags (ModelClient body) + public ModelClient TestSpecialTags (ModelClient modelClient) { - ApiResponse localVarResponse = TestSpecialTagsWithHttpInfo(body); + ApiResponse localVarResponse = TestSpecialTagsWithHttpInfo(modelClient); return localVarResponse.Data; } @@ -184,13 +184,13 @@ namespace IO.Swagger.Api /// To test special tags To test special tags /// /// Thrown when fails to make API call - /// client model + /// client model /// ApiResponse of ModelClient - public ApiResponse< ModelClient > TestSpecialTagsWithHttpInfo (ModelClient body) + public ApiResponse< ModelClient > TestSpecialTagsWithHttpInfo (ModelClient modelClient) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->TestSpecialTags"); + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->TestSpecialTags"); var localVarPath = "/another-fake/dummy"; var localVarPathParams = new Dictionary(); @@ -214,13 +214,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (modelClient != null && modelClient.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = modelClient; // byte array } @@ -246,11 +246,11 @@ namespace IO.Swagger.Api /// To test special tags To test special tags /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ModelClient - public async System.Threading.Tasks.Task TestSpecialTagsAsync (ModelClient body) + public async System.Threading.Tasks.Task TestSpecialTagsAsync (ModelClient modelClient) { - ApiResponse localVarResponse = await TestSpecialTagsAsyncWithHttpInfo(body); + ApiResponse localVarResponse = await TestSpecialTagsAsyncWithHttpInfo(modelClient); return localVarResponse.Data; } @@ -259,13 +259,13 @@ namespace IO.Swagger.Api /// To test special tags To test special tags /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestSpecialTagsAsyncWithHttpInfo (ModelClient body) + public async System.Threading.Tasks.Task> TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->TestSpecialTags"); + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->TestSpecialTags"); var localVarPath = "/another-fake/dummy"; var localVarPathParams = new Dictionary(); @@ -289,13 +289,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (modelClient != null && modelClient.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = modelClient; // byte array } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs index d281bbd031c1..be6efbf09a38 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs @@ -31,9 +31,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// OuterBoolean - OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null); + /// Input boolean as post body (optional) + /// bool? + bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null); /// /// @@ -42,9 +42,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of OuterBoolean - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (OuterBoolean body = null); + /// Input boolean as post body (optional) + /// ApiResponse of bool? + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? booleanPostBody = null); /// /// /// @@ -52,9 +52,9 @@ namespace IO.Swagger.Api /// Test serialization of object with outer number type /// /// Thrown when fails to make API call - /// Input composite as post body (optional) + /// Input composite as post body (optional) /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null); + OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null); /// /// @@ -63,9 +63,9 @@ namespace IO.Swagger.Api /// Test serialization of object with outer number type /// /// Thrown when fails to make API call - /// Input composite as post body (optional) + /// Input composite as post body (optional) /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite outerComposite = null); /// /// /// @@ -74,8 +74,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// OuterNumber - OuterNumber FakeOuterNumberSerialize (OuterNumber body = null); + /// decimal? + decimal? FakeOuterNumberSerialize (decimal? body = null); /// /// @@ -85,8 +85,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// ApiResponse of OuterNumber - ApiResponse FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null); + /// ApiResponse of decimal? + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = null); /// /// /// @@ -95,8 +95,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input string as post body (optional) - /// OuterString - OuterString FakeOuterStringSerialize (OuterString body = null); + /// string + string FakeOuterStringSerialize (string body = null); /// /// @@ -106,8 +106,31 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input string as post body (optional) - /// ApiResponse of OuterString - ApiResponse FakeOuterStringSerializeWithHttpInfo (OuterString body = null); + /// ApiResponse of string + ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = null); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void TestBodyWithQueryParams (string query, User user); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User user); /// /// To test \"client\" model /// @@ -115,9 +138,9 @@ namespace IO.Swagger.Api /// To test \"client\" model /// /// Thrown when fails to make API call - /// client model + /// client model /// ModelClient - ModelClient TestClientModel (ModelClient body); + ModelClient TestClientModel (ModelClient modelClient); /// /// To test \"client\" model @@ -126,9 +149,9 @@ namespace IO.Swagger.Api /// To test \"client\" model /// /// Thrown when fails to make API call - /// client model + /// client model /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo (ModelClient body); + ApiResponse TestClientModelWithHttpInfo (ModelClient modelClient); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -151,7 +174,7 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// - 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, byte[] 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 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -175,7 +198,7 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + ApiResponse TestEndpointParametersWithHttpInfo (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); /// /// To test enum parameters /// @@ -183,16 +206,16 @@ namespace IO.Swagger.Api /// To test enum parameters /// /// Thrown when fails to make API call - /// Form parameter enum test (string array) (optional) - /// Form parameter enum test (string) (optional, default to -efg) /// Header parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional) /// - void TestEnumParameters (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = 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 @@ -201,16 +224,16 @@ namespace IO.Swagger.Api /// To test enum parameters /// /// Thrown when fails to make API call - /// Form parameter enum test (string array) (optional) - /// Form parameter enum test (string) (optional, default to -efg) /// Header parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); /// /// test inline additionalProperties /// @@ -218,9 +241,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// request body + /// request body /// - void TestInlineAdditionalProperties (Object param); + void TestInlineAdditionalProperties (string requestBody); /// /// test inline additionalProperties @@ -229,9 +252,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// request body + /// request body /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Object param); + ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (string requestBody); /// /// test json serialization of form data /// @@ -264,9 +287,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Task of OuterBoolean - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (OuterBoolean body = null); + /// Input boolean as post body (optional) + /// Task of bool? + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? booleanPostBody = null); /// /// @@ -275,9 +298,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Task of ApiResponse (OuterBoolean) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (OuterBoolean body = null); + /// Input boolean as post body (optional) + /// Task of ApiResponse (bool?) + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? booleanPostBody = null); /// /// /// @@ -285,9 +308,9 @@ namespace IO.Swagger.Api /// Test serialization of object with outer number type /// /// Thrown when fails to make API call - /// Input composite as post body (optional) + /// Input composite as post body (optional) /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite outerComposite = null); /// /// @@ -296,9 +319,9 @@ namespace IO.Swagger.Api /// Test serialization of object with outer number type /// /// Thrown when fails to make API call - /// Input composite as post body (optional) + /// Input composite as post body (optional) /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite outerComposite = null); /// /// /// @@ -307,8 +330,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// Task of OuterNumber - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (OuterNumber body = null); + /// Task of decimal? + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null); /// /// @@ -318,8 +341,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// Task of ApiResponse (OuterNumber) - System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (OuterNumber body = null); + /// Task of ApiResponse (decimal?) + System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null); /// /// /// @@ -328,8 +351,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input string as post body (optional) - /// Task of OuterString - System.Threading.Tasks.Task FakeOuterStringSerializeAsync (OuterString body = null); + /// Task of string + System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = null); /// /// @@ -339,8 +362,31 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input string as post body (optional) - /// Task of ApiResponse (OuterString) - System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (OuterString body = null); + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = null); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Task of void + System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User user); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Task of ApiResponse + System.Threading.Tasks.Task> TestBodyWithQueryParamsAsyncWithHttpInfo (string query, User user); /// /// To test \"client\" model /// @@ -348,9 +394,9 @@ namespace IO.Swagger.Api /// To test \"client\" model /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync (ModelClient body); + System.Threading.Tasks.Task TestClientModelAsync (ModelClient modelClient); /// /// To test \"client\" model @@ -359,9 +405,9 @@ namespace IO.Swagger.Api /// To test \"client\" model /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelAsyncWithHttpInfo (ModelClient body); + System.Threading.Tasks.Task> TestClientModelAsyncWithHttpInfo (ModelClient modelClient); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -384,7 +430,7 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task TestEndpointParametersAsync (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 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -408,7 +454,7 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (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); /// /// To test enum parameters /// @@ -416,16 +462,16 @@ namespace IO.Swagger.Api /// To test enum parameters /// /// Thrown when fails to make API call - /// Form parameter enum test (string array) (optional) - /// Form parameter enum test (string) (optional, default to -efg) /// Header parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional) /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null); + System.Threading.Tasks.Task TestEnumParametersAsync (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 @@ -434,16 +480,16 @@ namespace IO.Swagger.Api /// To test enum parameters /// /// Thrown when fails to make API call - /// Form parameter enum test (string array) (optional) - /// Form parameter enum test (string) (optional, default to -efg) /// Header parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null); + System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); /// /// test inline additionalProperties /// @@ -451,9 +497,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// request body + /// request body /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Object param); + System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (string requestBody); /// /// test inline additionalProperties @@ -462,9 +508,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// request body + /// request body /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesAsyncWithHttpInfo (Object param); + System.Threading.Tasks.Task> TestInlineAdditionalPropertiesAsyncWithHttpInfo (string requestBody); /// /// test json serialization of form data /// @@ -592,11 +638,11 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// OuterBoolean - public OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null) + /// Input boolean as post body (optional) + /// bool? + public bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null) { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); + ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(booleanPostBody); return localVarResponse.Data; } @@ -604,9 +650,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of OuterBoolean - public ApiResponse< OuterBoolean > FakeOuterBooleanSerializeWithHttpInfo (OuterBoolean body = null) + /// Input boolean as post body (optional) + /// ApiResponse of bool? + public ApiResponse< bool? > FakeOuterBooleanSerializeWithHttpInfo (bool? booleanPostBody = null) { var localVarPath = "/fake/outer/boolean"; @@ -624,18 +670,19 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { + "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (booleanPostBody != null && booleanPostBody.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(booleanPostBody); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = booleanPostBody; // byte array } @@ -652,20 +699,20 @@ namespace IO.Swagger.Api if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (OuterBoolean) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean))); + (bool?) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool?))); } /// /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Task of OuterBoolean - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (OuterBoolean body = null) + /// Input boolean as post body (optional) + /// Task of bool? + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? booleanPostBody = null) { - ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); + ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(booleanPostBody); return localVarResponse.Data; } @@ -674,9 +721,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Task of ApiResponse (OuterBoolean) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (OuterBoolean body = null) + /// Input boolean as post body (optional) + /// Task of ApiResponse (bool?) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? booleanPostBody = null) { var localVarPath = "/fake/outer/boolean"; @@ -694,18 +741,19 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { + "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (booleanPostBody != null && booleanPostBody.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(booleanPostBody); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = booleanPostBody; // byte array } @@ -722,20 +770,20 @@ namespace IO.Swagger.Api if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (OuterBoolean) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean))); + (bool?) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool?))); } /// /// Test serialization of object with outer number type /// /// Thrown when fails to make API call - /// Input composite as post body (optional) + /// Input composite as post body (optional) /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) + public OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) { - ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); + ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; } @@ -743,9 +791,9 @@ namespace IO.Swagger.Api /// Test serialization of object with outer number type /// /// Thrown when fails to make API call - /// Input composite as post body (optional) + /// Input composite as post body (optional) /// ApiResponse of OuterComposite - public ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null) + public ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite outerComposite = null) { var localVarPath = "/fake/outer/composite"; @@ -763,18 +811,19 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { + "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (outerComposite != null && outerComposite.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(outerComposite); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = outerComposite; // byte array } @@ -800,11 +849,11 @@ namespace IO.Swagger.Api /// Test serialization of object with outer number type /// /// Thrown when fails to make API call - /// Input composite as post body (optional) + /// Input composite as post body (optional) /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite outerComposite = null) { - ApiResponse localVarResponse = await FakeOuterCompositeSerializeAsyncWithHttpInfo(body); + ApiResponse localVarResponse = await FakeOuterCompositeSerializeAsyncWithHttpInfo(outerComposite); return localVarResponse.Data; } @@ -813,9 +862,9 @@ namespace IO.Swagger.Api /// Test serialization of object with outer number type /// /// Thrown when fails to make API call - /// Input composite as post body (optional) + /// Input composite as post body (optional) /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite outerComposite = null) { var localVarPath = "/fake/outer/composite"; @@ -833,18 +882,19 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { + "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (outerComposite != null && outerComposite.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(outerComposite); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = outerComposite; // byte array } @@ -871,10 +921,10 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// OuterNumber - public OuterNumber FakeOuterNumberSerialize (OuterNumber body = null) + /// decimal? + public decimal? FakeOuterNumberSerialize (decimal? body = null) { - ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); + ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; } @@ -883,8 +933,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// ApiResponse of OuterNumber - public ApiResponse< OuterNumber > FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null) + /// ApiResponse of decimal? + public ApiResponse< decimal? > FakeOuterNumberSerializeWithHttpInfo (decimal? body = null) { var localVarPath = "/fake/outer/number"; @@ -902,6 +952,7 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { + "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -930,9 +981,9 @@ namespace IO.Swagger.Api if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (OuterNumber) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber))); + (decimal?) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal?))); } /// @@ -940,10 +991,10 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// Task of OuterNumber - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (OuterNumber body = null) + /// Task of decimal? + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null) { - ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); + ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; } @@ -953,8 +1004,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// Task of ApiResponse (OuterNumber) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (OuterNumber body = null) + /// Task of ApiResponse (decimal?) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null) { var localVarPath = "/fake/outer/number"; @@ -972,6 +1023,7 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { + "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1000,9 +1052,9 @@ namespace IO.Swagger.Api if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (OuterNumber) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber))); + (decimal?) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal?))); } /// @@ -1010,10 +1062,10 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input string as post body (optional) - /// OuterString - public OuterString FakeOuterStringSerialize (OuterString body = null) + /// string + public string FakeOuterStringSerialize (string body = null) { - ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); + ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; } @@ -1022,8 +1074,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input string as post body (optional) - /// ApiResponse of OuterString - public ApiResponse< OuterString > FakeOuterStringSerializeWithHttpInfo (OuterString body = null) + /// ApiResponse of string + public ApiResponse< string > FakeOuterStringSerializeWithHttpInfo (string body = null) { var localVarPath = "/fake/outer/string"; @@ -1041,6 +1093,7 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { + "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1069,9 +1122,9 @@ namespace IO.Swagger.Api if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (OuterString) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString))); + (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } /// @@ -1079,10 +1132,10 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input string as post body (optional) - /// Task of OuterString - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (OuterString body = null) + /// Task of string + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = null) { - ApiResponse localVarResponse = await FakeOuterStringSerializeAsyncWithHttpInfo(body); + ApiResponse localVarResponse = await FakeOuterStringSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; } @@ -1092,8 +1145,8 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// Input string as post body (optional) - /// Task of ApiResponse (OuterString) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (OuterString body = null) + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = null) { var localVarPath = "/fake/outer/string"; @@ -1111,6 +1164,7 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { + "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1139,20 +1193,177 @@ namespace IO.Swagger.Api if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (OuterString) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString))); + (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + public void TestBodyWithQueryParams (string query, User user) + { + TestBodyWithQueryParamsWithHttpInfo(query, user); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User user) + { + // verify the required parameter 'query' is set + if (query == null) + throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); + + var localVarPath = "/fake/body-with-query-params"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter + if (user != null && user.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter + } + else + { + localVarPostBody = user; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Task of void + public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User user) + { + await TestBodyWithQueryParamsAsyncWithHttpInfo(query, user); + + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestBodyWithQueryParamsAsyncWithHttpInfo (string query, User user) + { + // verify the required parameter 'query' is set + if (query == null) + throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); + + var localVarPath = "/fake/body-with-query-params"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter + if (user != null && user.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter + } + else + { + localVarPostBody = user; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); } /// /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call - /// client model + /// client model /// ModelClient - public ModelClient TestClientModel (ModelClient body) + public ModelClient TestClientModel (ModelClient modelClient) { - ApiResponse localVarResponse = TestClientModelWithHttpInfo(body); + ApiResponse localVarResponse = TestClientModelWithHttpInfo(modelClient); return localVarResponse.Data; } @@ -1160,13 +1371,13 @@ namespace IO.Swagger.Api /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call - /// client model + /// client model /// ApiResponse of ModelClient - public ApiResponse< ModelClient > TestClientModelWithHttpInfo (ModelClient body) + public ApiResponse< ModelClient > TestClientModelWithHttpInfo (ModelClient modelClient) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); var localVarPath = "/fake"; var localVarPathParams = new Dictionary(); @@ -1190,13 +1401,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (modelClient != null && modelClient.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = modelClient; // byte array } @@ -1222,11 +1433,11 @@ namespace IO.Swagger.Api /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync (ModelClient body) + public async System.Threading.Tasks.Task TestClientModelAsync (ModelClient modelClient) { - ApiResponse localVarResponse = await TestClientModelAsyncWithHttpInfo(body); + ApiResponse localVarResponse = await TestClientModelAsyncWithHttpInfo(modelClient); return localVarResponse.Data; } @@ -1235,13 +1446,13 @@ namespace IO.Swagger.Api /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelAsyncWithHttpInfo (ModelClient body) + public async System.Threading.Tasks.Task> TestClientModelAsyncWithHttpInfo (ModelClient modelClient) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); var localVarPath = "/fake"; var localVarPathParams = new Dictionary(); @@ -1265,13 +1476,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (modelClient != null && modelClient.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = modelClient; // byte array } @@ -1312,7 +1523,7 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// - public 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, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public 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) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -1336,7 +1547,7 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public ApiResponse TestEndpointParametersWithHttpInfo (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) { // verify the required parameter 'number' is set if (number == null) @@ -1361,15 +1572,12 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/xml; charset=utf-8", - "application/json; charset=utf-8" + "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml; charset=utf-8", - "application/json; charset=utf-8" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1384,7 +1592,7 @@ namespace IO.Swagger.Api if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFormParams.Add("binary", this.Configuration.ApiClient.ParameterToString(binary)); // form parameter + if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter @@ -1434,7 +1642,7 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (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) { await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -1459,7 +1667,7 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (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) { // verify the required parameter 'number' is set if (number == null) @@ -1484,15 +1692,12 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/xml; charset=utf-8", - "application/json; charset=utf-8" + "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml; charset=utf-8", - "application/json; charset=utf-8" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1507,7 +1712,7 @@ namespace IO.Swagger.Api if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFormParams.Add("binary", this.Configuration.ApiClient.ParameterToString(binary)); // form parameter + if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter @@ -1542,34 +1747,34 @@ namespace IO.Swagger.Api /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Form parameter enum test (string array) (optional) - /// Form parameter enum test (string) (optional, default to -efg) /// Header parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional) /// - public void TestEnumParameters (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null) + public 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) { - TestEnumParametersWithHttpInfo(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } /// /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Form parameter enum test (string array) (optional) - /// Form parameter enum test (string) (optional, default to -efg) /// Header parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional) /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null) + public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) { var localVarPath = "/fake"; @@ -1582,13 +1787,12 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "*/*" + "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1597,11 +1801,11 @@ namespace IO.Swagger.Api if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter + 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 (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - if (enumQueryDouble != null) localVarFormParams.Add("enum_query_double", this.Configuration.ApiClient.ParameterToString(enumQueryDouble)); // form parameter // make the HTTP request @@ -1626,18 +1830,18 @@ namespace IO.Swagger.Api /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Form parameter enum test (string array) (optional) - /// Form parameter enum test (string) (optional, default to -efg) /// Header parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional) /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null) + public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) { - await TestEnumParametersAsyncWithHttpInfo(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + await TestEnumParametersAsyncWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -1645,16 +1849,16 @@ namespace IO.Swagger.Api /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Form parameter enum test (string array) (optional) - /// Form parameter enum test (string) (optional, default to -efg) /// Header parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null) + public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) { var localVarPath = "/fake"; @@ -1667,13 +1871,12 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "*/*" + "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1682,11 +1885,11 @@ namespace IO.Swagger.Api if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter + 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 (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - if (enumQueryDouble != null) localVarFormParams.Add("enum_query_double", this.Configuration.ApiClient.ParameterToString(enumQueryDouble)); // form parameter // make the HTTP request @@ -1711,24 +1914,24 @@ namespace IO.Swagger.Api /// test inline additionalProperties /// /// Thrown when fails to make API call - /// request body + /// request body /// - public void TestInlineAdditionalProperties (Object param) + public void TestInlineAdditionalProperties (string requestBody) { - TestInlineAdditionalPropertiesWithHttpInfo(param); + TestInlineAdditionalPropertiesWithHttpInfo(requestBody); } /// /// test inline additionalProperties /// /// Thrown when fails to make API call - /// request body + /// request body /// ApiResponse of Object(void) - public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Object param) + public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (string requestBody) { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); + // verify the required parameter 'requestBody' is set + if (requestBody == null) + throw new ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); var localVarPath = "/fake/inline-additionalProperties"; var localVarPathParams = new Dictionary(); @@ -1751,13 +1954,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (param != null && param.GetType() != typeof(byte[])) + if (requestBody != null && requestBody.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(requestBody); // http body (model) parameter } else { - localVarPostBody = param; // byte array + localVarPostBody = requestBody; // byte array } @@ -1783,11 +1986,11 @@ namespace IO.Swagger.Api /// test inline additionalProperties /// /// Thrown when fails to make API call - /// request body + /// request body /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Object param) + public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (string requestBody) { - await TestInlineAdditionalPropertiesAsyncWithHttpInfo(param); + await TestInlineAdditionalPropertiesAsyncWithHttpInfo(requestBody); } @@ -1795,13 +1998,13 @@ namespace IO.Swagger.Api /// test inline additionalProperties /// /// Thrown when fails to make API call - /// request body + /// request body /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesAsyncWithHttpInfo (Object param) + public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesAsyncWithHttpInfo (string requestBody) { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); + // verify the required parameter 'requestBody' is set + if (requestBody == null) + throw new ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); var localVarPath = "/fake/inline-additionalProperties"; var localVarPathParams = new Dictionary(); @@ -1824,13 +2027,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (param != null && param.GetType() != typeof(byte[])) + if (requestBody != null && requestBody.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(requestBody); // http body (model) parameter } else { - localVarPostBody = param; // byte array + localVarPostBody = requestBody; // byte array } @@ -1890,7 +2093,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" + "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1962,7 +2165,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" + "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeClassnameTags123Api.cs index 3a67445d1927..e9c955faf1e1 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeClassnameTags123Api.cs @@ -28,46 +28,46 @@ namespace IO.Swagger.Api /// To test class name in snake case /// /// - /// + /// To test class name in snake case /// /// Thrown when fails to make API call - /// client model + /// client model /// ModelClient - ModelClient TestClassname (ModelClient body); + ModelClient TestClassname (ModelClient modelClient); /// /// To test class name in snake case /// /// - /// + /// To test class name in snake case /// /// Thrown when fails to make API call - /// client model + /// client model /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo (ModelClient body); + ApiResponse TestClassnameWithHttpInfo (ModelClient modelClient); #endregion Synchronous Operations #region Asynchronous Operations /// /// To test class name in snake case /// /// - /// + /// To test class name in snake case /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync (ModelClient body); + System.Threading.Tasks.Task TestClassnameAsync (ModelClient modelClient); /// /// To test class name in snake case /// /// - /// + /// To test class name in snake case /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameAsyncWithHttpInfo (ModelClient body); + System.Threading.Tasks.Task> TestClassnameAsyncWithHttpInfo (ModelClient modelClient); #endregion Asynchronous Operations } @@ -169,28 +169,28 @@ namespace IO.Swagger.Api } /// - /// To test class name in snake case + /// To test class name in snake case To test class name in snake case /// /// Thrown when fails to make API call - /// client model + /// client model /// ModelClient - public ModelClient TestClassname (ModelClient body) + public ModelClient TestClassname (ModelClient modelClient) { - ApiResponse localVarResponse = TestClassnameWithHttpInfo(body); + ApiResponse localVarResponse = TestClassnameWithHttpInfo(modelClient); return localVarResponse.Data; } /// - /// To test class name in snake case + /// To test class name in snake case To test class name in snake case /// /// Thrown when fails to make API call - /// client model + /// client model /// ApiResponse of ModelClient - public ApiResponse< ModelClient > TestClassnameWithHttpInfo (ModelClient body) + public ApiResponse< ModelClient > TestClassnameWithHttpInfo (ModelClient modelClient) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); var localVarPath = "/fake_classname_test"; var localVarPathParams = new Dictionary(); @@ -214,13 +214,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (modelClient != null && modelClient.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = modelClient; // byte array } // authentication (api_key_query) required @@ -248,29 +248,29 @@ namespace IO.Swagger.Api } /// - /// To test class name in snake case + /// To test class name in snake case To test class name in snake case /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync (ModelClient body) + public async System.Threading.Tasks.Task TestClassnameAsync (ModelClient modelClient) { - ApiResponse localVarResponse = await TestClassnameAsyncWithHttpInfo(body); + ApiResponse localVarResponse = await TestClassnameAsyncWithHttpInfo(modelClient); return localVarResponse.Data; } /// - /// To test class name in snake case + /// To test class name in snake case To test class name in snake case /// /// Thrown when fails to make API call - /// client model + /// client model /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameAsyncWithHttpInfo (ModelClient body) + public async System.Threading.Tasks.Task> TestClassnameAsyncWithHttpInfo (ModelClient modelClient) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); var localVarPath = "/fake_classname_test"; var localVarPathParams = new Dictionary(); @@ -294,13 +294,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (modelClient != null && modelClient.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = modelClient; // byte array } // authentication (api_key_query) required diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs index 903d703d7d82..1d859c587b25 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs @@ -31,9 +31,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// - void AddPet (Pet body); + void AddPet (Pet pet); /// /// Add a new pet to the store @@ -42,9 +42,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo (Pet body); + ApiResponse AddPetWithHttpInfo (Pet pet); /// /// Deletes a pet /// @@ -138,9 +138,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// - void UpdatePet (Pet body); + void UpdatePet (Pet pet); /// /// Update an existing pet @@ -149,9 +149,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo (Pet body); + ApiResponse UpdatePetWithHttpInfo (Pet pet); /// /// Updates a pet in the store with form data /// @@ -211,9 +211,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// Task of void - System.Threading.Tasks.Task AddPetAsync (Pet body); + System.Threading.Tasks.Task AddPetAsync (Pet pet); /// /// Add a new pet to the store @@ -222,9 +222,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetAsyncWithHttpInfo (Pet body); + System.Threading.Tasks.Task> AddPetAsyncWithHttpInfo (Pet pet); /// /// Deletes a pet /// @@ -318,9 +318,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// Task of void - System.Threading.Tasks.Task UpdatePetAsync (Pet body); + System.Threading.Tasks.Task UpdatePetAsync (Pet pet); /// /// Update an existing pet @@ -329,9 +329,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetAsyncWithHttpInfo (Pet body); + System.Threading.Tasks.Task> UpdatePetAsyncWithHttpInfo (Pet pet); /// /// Updates a pet in the store with form data /// @@ -486,24 +486,24 @@ namespace IO.Swagger.Api /// Add a new pet to the store /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// - public void AddPet (Pet body) + public void AddPet (Pet pet) { - AddPetWithHttpInfo(body); + AddPetWithHttpInfo(pet); } /// /// Add a new pet to the store /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// ApiResponse of Object(void) - public ApiResponse AddPetWithHttpInfo (Pet body) + public ApiResponse AddPetWithHttpInfo (Pet pet) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); + // verify the required parameter 'pet' is set + if (pet == null) + throw new ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); var localVarPath = "/pet"; var localVarPathParams = new Dictionary(); @@ -522,20 +522,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (pet != null && pet.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = pet; // byte array } // authentication (petstore_auth) required @@ -567,11 +565,11 @@ namespace IO.Swagger.Api /// Add a new pet to the store /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// Task of void - public async System.Threading.Tasks.Task AddPetAsync (Pet body) + public async System.Threading.Tasks.Task AddPetAsync (Pet pet) { - await AddPetAsyncWithHttpInfo(body); + await AddPetAsyncWithHttpInfo(pet); } @@ -579,13 +577,13 @@ namespace IO.Swagger.Api /// Add a new pet to the store /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetAsyncWithHttpInfo (Pet body) + public async System.Threading.Tasks.Task> AddPetAsyncWithHttpInfo (Pet pet) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); + // verify the required parameter 'pet' is set + if (pet == null) + throw new ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); var localVarPath = "/pet"; var localVarPathParams = new Dictionary(); @@ -604,20 +602,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (pet != null && pet.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = pet; // byte array } // authentication (petstore_auth) required @@ -685,8 +681,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -761,8 +755,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1239,24 +1231,24 @@ namespace IO.Swagger.Api /// Update an existing pet /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// - public void UpdatePet (Pet body) + public void UpdatePet (Pet pet) { - UpdatePetWithHttpInfo(body); + UpdatePetWithHttpInfo(pet); } /// /// Update an existing pet /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithHttpInfo (Pet body) + public ApiResponse UpdatePetWithHttpInfo (Pet pet) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); + // verify the required parameter 'pet' is set + if (pet == null) + throw new ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); var localVarPath = "/pet"; var localVarPathParams = new Dictionary(); @@ -1275,20 +1267,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (pet != null && pet.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = pet; // byte array } // authentication (petstore_auth) required @@ -1320,11 +1310,11 @@ namespace IO.Swagger.Api /// Update an existing pet /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) + public async System.Threading.Tasks.Task UpdatePetAsync (Pet pet) { - await UpdatePetAsyncWithHttpInfo(body); + await UpdatePetAsyncWithHttpInfo(pet); } @@ -1332,13 +1322,13 @@ namespace IO.Swagger.Api /// Update an existing pet /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetAsyncWithHttpInfo (Pet body) + public async System.Threading.Tasks.Task> UpdatePetAsyncWithHttpInfo (Pet pet) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); + // verify the required parameter 'pet' is set + if (pet == null) + throw new ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); var localVarPath = "/pet"; var localVarPathParams = new Dictionary(); @@ -1357,20 +1347,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (pet != null && pet.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = pet; // byte array } // authentication (petstore_auth) required @@ -1441,8 +1429,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1521,8 +1507,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs index 37c55391a835..b694a9ee7fdf 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs @@ -92,9 +92,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// order placed for purchasing the pet + /// order placed for purchasing the pet /// Order - Order PlaceOrder (Order body); + Order PlaceOrder (Order order); /// /// Place an order for a pet @@ -103,9 +103,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// order placed for purchasing the pet + /// order placed for purchasing the pet /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo (Order body); + ApiResponse PlaceOrderWithHttpInfo (Order order); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -176,9 +176,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// order placed for purchasing the pet + /// order placed for purchasing the pet /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync (Order body); + System.Threading.Tasks.Task PlaceOrderAsync (Order order); /// /// Place an order for a pet @@ -187,9 +187,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// order placed for purchasing the pet + /// order placed for purchasing the pet /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderAsyncWithHttpInfo (Order body); + System.Threading.Tasks.Task> PlaceOrderAsyncWithHttpInfo (Order order); #endregion Asynchronous Operations } @@ -328,8 +328,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -395,8 +393,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -693,11 +689,11 @@ namespace IO.Swagger.Api /// Place an order for a pet /// /// Thrown when fails to make API call - /// order placed for purchasing the pet + /// order placed for purchasing the pet /// Order - public Order PlaceOrder (Order body) + public Order PlaceOrder (Order order) { - ApiResponse localVarResponse = PlaceOrderWithHttpInfo(body); + ApiResponse localVarResponse = PlaceOrderWithHttpInfo(order); return localVarResponse.Data; } @@ -705,13 +701,13 @@ namespace IO.Swagger.Api /// Place an order for a pet /// /// Thrown when fails to make API call - /// order placed for purchasing the pet + /// order placed for purchasing the pet /// ApiResponse of Order - public ApiResponse< Order > PlaceOrderWithHttpInfo (Order body) + public ApiResponse< Order > PlaceOrderWithHttpInfo (Order order) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); + // verify the required parameter 'order' is set + if (order == null) + throw new ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); var localVarPath = "/store/order"; var localVarPathParams = new Dictionary(); @@ -735,13 +731,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (order != null && order.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(order); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = order; // byte array } @@ -767,11 +763,11 @@ namespace IO.Swagger.Api /// Place an order for a pet /// /// Thrown when fails to make API call - /// order placed for purchasing the pet + /// order placed for purchasing the pet /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync (Order body) + public async System.Threading.Tasks.Task PlaceOrderAsync (Order order) { - ApiResponse localVarResponse = await PlaceOrderAsyncWithHttpInfo(body); + ApiResponse localVarResponse = await PlaceOrderAsyncWithHttpInfo(order); return localVarResponse.Data; } @@ -780,13 +776,13 @@ namespace IO.Swagger.Api /// Place an order for a pet /// /// Thrown when fails to make API call - /// order placed for purchasing the pet + /// order placed for purchasing the pet /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderAsyncWithHttpInfo (Order body) + public async System.Threading.Tasks.Task> PlaceOrderAsyncWithHttpInfo (Order order) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); + // verify the required parameter 'order' is set + if (order == null) + throw new ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); var localVarPath = "/store/order"; var localVarPathParams = new Dictionary(); @@ -810,13 +806,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (order != null && order.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(order); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = order; // byte array } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs index 3a6e0fe465f6..8e5dd7f7e988 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs @@ -31,9 +31,9 @@ namespace IO.Swagger.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object + /// Created user object /// - void CreateUser (User body); + void CreateUser (User user); /// /// Create user @@ -42,9 +42,9 @@ namespace IO.Swagger.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object + /// Created user object /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo (User body); + ApiResponse CreateUserWithHttpInfo (User user); /// /// Creates list of users with given input array /// @@ -52,9 +52,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// - void CreateUsersWithArrayInput (List body); + void CreateUsersWithArrayInput (List user); /// /// Creates list of users with given input array @@ -63,9 +63,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body); + ApiResponse CreateUsersWithArrayInputWithHttpInfo (List user); /// /// Creates list of users with given input array /// @@ -73,9 +73,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// - void CreateUsersWithListInput (List body); + void CreateUsersWithListInput (List user); /// /// Creates list of users with given input array @@ -84,9 +84,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo (List body); + ApiResponse CreateUsersWithListInputWithHttpInfo (List user); /// /// Delete user /// @@ -115,7 +115,7 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// User User GetUserByName (string username); @@ -126,7 +126,7 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// ApiResponse of User ApiResponse GetUserByNameWithHttpInfo (string username); /// @@ -179,9 +179,9 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// name that need to be deleted - /// Updated user object + /// Updated user object /// - void UpdateUser (string username, User body); + void UpdateUser (string username, User user); /// /// Updated user @@ -191,9 +191,9 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// name that need to be deleted - /// Updated user object + /// Updated user object /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo (string username, User body); + ApiResponse UpdateUserWithHttpInfo (string username, User user); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -203,9 +203,9 @@ namespace IO.Swagger.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object + /// Created user object /// Task of void - System.Threading.Tasks.Task CreateUserAsync (User body); + System.Threading.Tasks.Task CreateUserAsync (User user); /// /// Create user @@ -214,9 +214,9 @@ namespace IO.Swagger.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object + /// Created user object /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserAsyncWithHttpInfo (User body); + System.Threading.Tasks.Task> CreateUserAsyncWithHttpInfo (User user); /// /// Creates list of users with given input array /// @@ -224,9 +224,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List body); + System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List user); /// /// Creates list of users with given input array @@ -235,9 +235,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputAsyncWithHttpInfo (List body); + System.Threading.Tasks.Task> CreateUsersWithArrayInputAsyncWithHttpInfo (List user); /// /// Creates list of users with given input array /// @@ -245,9 +245,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync (List body); + System.Threading.Tasks.Task CreateUsersWithListInputAsync (List user); /// /// Creates list of users with given input array @@ -256,9 +256,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputAsyncWithHttpInfo (List body); + System.Threading.Tasks.Task> CreateUsersWithListInputAsyncWithHttpInfo (List user); /// /// Delete user /// @@ -287,7 +287,7 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// Task of User System.Threading.Tasks.Task GetUserByNameAsync (string username); @@ -298,7 +298,7 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// Task of ApiResponse (User) System.Threading.Tasks.Task> GetUserByNameAsyncWithHttpInfo (string username); /// @@ -351,9 +351,9 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// name that need to be deleted - /// Updated user object + /// Updated user object /// Task of void - System.Threading.Tasks.Task UpdateUserAsync (string username, User body); + System.Threading.Tasks.Task UpdateUserAsync (string username, User user); /// /// Updated user @@ -363,9 +363,9 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// name that need to be deleted - /// Updated user object + /// Updated user object /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserAsyncWithHttpInfo (string username, User body); + System.Threading.Tasks.Task> UpdateUserAsyncWithHttpInfo (string username, User user); #endregion Asynchronous Operations } @@ -470,24 +470,24 @@ namespace IO.Swagger.Api /// Create user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object + /// Created user object /// - public void CreateUser (User body) + public void CreateUser (User user) { - CreateUserWithHttpInfo(body); + CreateUserWithHttpInfo(user); } /// /// Create user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object + /// Created user object /// ApiResponse of Object(void) - public ApiResponse CreateUserWithHttpInfo (User body) + public ApiResponse CreateUserWithHttpInfo (User user) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); var localVarPath = "/user"; var localVarPathParams = new Dictionary(); @@ -504,20 +504,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (user != null && user.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = user; // byte array } @@ -543,11 +541,11 @@ namespace IO.Swagger.Api /// Create user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object + /// Created user object /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync (User body) + public async System.Threading.Tasks.Task CreateUserAsync (User user) { - await CreateUserAsyncWithHttpInfo(body); + await CreateUserAsyncWithHttpInfo(user); } @@ -555,13 +553,13 @@ namespace IO.Swagger.Api /// Create user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object + /// Created user object /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserAsyncWithHttpInfo (User body) + public async System.Threading.Tasks.Task> CreateUserAsyncWithHttpInfo (User user) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); var localVarPath = "/user"; var localVarPathParams = new Dictionary(); @@ -578,20 +576,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (user != null && user.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = user; // byte array } @@ -617,24 +613,24 @@ namespace IO.Swagger.Api /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// - public void CreateUsersWithArrayInput (List body) + public void CreateUsersWithArrayInput (List user) { - CreateUsersWithArrayInputWithHttpInfo(body); + CreateUsersWithArrayInputWithHttpInfo(user); } /// /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body) + public ApiResponse CreateUsersWithArrayInputWithHttpInfo (List user) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); var localVarPath = "/user/createWithArray"; var localVarPathParams = new Dictionary(); @@ -651,20 +647,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (user != null && user.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = user; // byte array } @@ -690,11 +684,11 @@ namespace IO.Swagger.Api /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List body) + public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List user) { - await CreateUsersWithArrayInputAsyncWithHttpInfo(body); + await CreateUsersWithArrayInputAsyncWithHttpInfo(user); } @@ -702,13 +696,13 @@ namespace IO.Swagger.Api /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputAsyncWithHttpInfo (List body) + public async System.Threading.Tasks.Task> CreateUsersWithArrayInputAsyncWithHttpInfo (List user) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); var localVarPath = "/user/createWithArray"; var localVarPathParams = new Dictionary(); @@ -725,20 +719,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (user != null && user.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = user; // byte array } @@ -764,24 +756,24 @@ namespace IO.Swagger.Api /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// - public void CreateUsersWithListInput (List body) + public void CreateUsersWithListInput (List user) { - CreateUsersWithListInputWithHttpInfo(body); + CreateUsersWithListInputWithHttpInfo(user); } /// /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithListInputWithHttpInfo (List body) + public ApiResponse CreateUsersWithListInputWithHttpInfo (List user) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); var localVarPath = "/user/createWithList"; var localVarPathParams = new Dictionary(); @@ -798,20 +790,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (user != null && user.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = user; // byte array } @@ -837,11 +827,11 @@ namespace IO.Swagger.Api /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List body) + public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List user) { - await CreateUsersWithListInputAsyncWithHttpInfo(body); + await CreateUsersWithListInputAsyncWithHttpInfo(user); } @@ -849,13 +839,13 @@ namespace IO.Swagger.Api /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object + /// List of user object /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputAsyncWithHttpInfo (List body) + public async System.Threading.Tasks.Task> CreateUsersWithListInputAsyncWithHttpInfo (List user) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); var localVarPath = "/user/createWithList"; var localVarPathParams = new Dictionary(); @@ -872,20 +862,18 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (user != null && user.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = user; // byte array } @@ -945,8 +933,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1012,8 +998,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1044,7 +1028,7 @@ namespace IO.Swagger.Api /// Get user by user name /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// User public User GetUserByName (string username) { @@ -1056,7 +1040,7 @@ namespace IO.Swagger.Api /// Get user by user name /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// ApiResponse of User public ApiResponse< User > GetUserByNameWithHttpInfo (string username) { @@ -1111,7 +1095,7 @@ namespace IO.Swagger.Api /// Get user by user name /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// Task of User public async System.Threading.Tasks.Task GetUserByNameAsync (string username) { @@ -1124,7 +1108,7 @@ namespace IO.Swagger.Api /// Get user by user name /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// Task of ApiResponse (User) public async System.Threading.Tasks.Task> GetUserByNameAsyncWithHttpInfo (string username) { @@ -1355,8 +1339,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1416,8 +1398,6 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) @@ -1448,11 +1428,11 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// name that need to be deleted - /// Updated user object + /// Updated user object /// - public void UpdateUser (string username, User body) + public void UpdateUser (string username, User user) { - UpdateUserWithHttpInfo(username, body); + UpdateUserWithHttpInfo(username, user); } /// @@ -1460,16 +1440,16 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// name that need to be deleted - /// Updated user object + /// Updated user object /// ApiResponse of Object(void) - public ApiResponse UpdateUserWithHttpInfo (string username, User body) + public ApiResponse UpdateUserWithHttpInfo (string username, User user) { // verify the required parameter 'username' is set if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); var localVarPath = "/user/{username}"; var localVarPathParams = new Dictionary(); @@ -1486,21 +1466,19 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) + if (user != null && user.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = user; // byte array } @@ -1527,11 +1505,11 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// name that need to be deleted - /// Updated user object + /// Updated user object /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body) + public async System.Threading.Tasks.Task UpdateUserAsync (string username, User user) { - await UpdateUserAsyncWithHttpInfo(username, body); + await UpdateUserAsyncWithHttpInfo(username, user); } @@ -1540,16 +1518,16 @@ namespace IO.Swagger.Api /// /// Thrown when fails to make API call /// name that need to be deleted - /// Updated user object + /// Updated user object /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserAsyncWithHttpInfo (string username, User body) + public async System.Threading.Tasks.Task> UpdateUserAsyncWithHttpInfo (string username, User user) { // verify the required parameter 'username' is set if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); + // verify the required parameter 'user' is set + if (user == null) + throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); var localVarPath = "/user/{username}"; var localVarPathParams = new Dictionary(); @@ -1566,21 +1544,19 @@ namespace IO.Swagger.Api // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) + if (user != null && user.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = user; // byte array } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/GlobalConfiguration.cs index d8b196fc3e8b..5ec786b49562 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/GlobalConfiguration.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/GlobalConfiguration.cs @@ -25,7 +25,7 @@ namespace IO.Swagger.Client /// /// /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .swagger-codegen-ignore file. + /// be excluded from automatic generation via a .openapi-generator-ignore file. /// public partial class GlobalConfiguration : Configuration { diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs index bf0aedbb4eb5..0db9acdefc3a 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs @@ -39,7 +39,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// declawed. - public Cat(bool? declawed = default(bool?), string className = "Cat", string color = "red") : base(className, color) + public Cat(bool? declawed = default(bool?), string className = default(string), string color = "red") : base(className, color) { this.Declawed = declawed; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs index 4705f66264da..f0d2d395c69c 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs @@ -39,7 +39,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// breed. - public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color) + public Dog(string breed = default(string), string className = default(string), string color = "red") : base(className, color) { this.Breed = breed; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs index 5f4b84d5b7e0..0e0041b49e01 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs @@ -62,6 +62,37 @@ namespace IO.Swagger.Model [DataMember(Name="enum_string", EmitDefaultValue=false)] public EnumStringEnum? EnumString { get; set; } /// + /// Defines EnumStringRequired + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumStringRequiredEnum + { + + /// + /// Enum UPPER for value: UPPER + /// + [EnumMember(Value = "UPPER")] + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + [EnumMember(Value = "lower")] + Lower = 2, + + /// + /// Enum Empty for value: + /// + [EnumMember(Value = "")] + Empty = 3 + } + + /// + /// Gets or Sets EnumStringRequired + /// + [DataMember(Name="enum_string_required", EmitDefaultValue=false)] + public EnumStringRequiredEnum EnumStringRequired { get; set; } + /// /// Defines EnumInteger /// public enum EnumIntegerEnum @@ -118,12 +149,27 @@ namespace IO.Swagger.Model /// /// Initializes a new instance of the class. /// + [JsonConstructorAttribute] + protected EnumTest() { } + /// + /// Initializes a new instance of the class. + /// /// enumString. + /// enumStringRequired (required). /// enumInteger. /// enumNumber. /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), 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) + { + throw new InvalidDataException("enumStringRequired is a required property for EnumTest and cannot be null"); + } + else + { + this.EnumStringRequired = enumStringRequired; + } this.EnumString = enumString; this.EnumInteger = enumInteger; this.EnumNumber = enumNumber; @@ -134,6 +180,7 @@ namespace IO.Swagger.Model + /// /// Returns the string presentation of the object /// @@ -143,6 +190,7 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class EnumTest {\n"); sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); @@ -185,6 +233,11 @@ namespace IO.Swagger.Model (this.EnumString != null && this.EnumString.Equals(input.EnumString)) ) && + ( + this.EnumStringRequired == input.EnumStringRequired || + (this.EnumStringRequired != null && + this.EnumStringRequired.Equals(input.EnumStringRequired)) + ) && ( this.EnumInteger == input.EnumInteger || (this.EnumInteger != null && @@ -213,6 +266,8 @@ namespace IO.Swagger.Model int hashCode = 41; if (this.EnumString != null) hashCode = hashCode * 59 + this.EnumString.GetHashCode(); + if (this.EnumStringRequired != null) + hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode(); if (this.EnumInteger != null) hashCode = hashCode * 59 + this.EnumInteger.GetHashCode(); if (this.EnumNumber != null) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs index 129677abb0f0..078ad55f5b87 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs @@ -51,7 +51,7 @@ namespace IO.Swagger.Model /// dateTime. /// uuid. /// password (required). - public FormatTest(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), byte[] _byte = default(byte[]), byte[] binary = default(byte[]), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), Guid? uuid = default(Guid?), string password = default(string)) + public FormatTest(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), Guid? uuid = default(Guid?), string password = default(string)) { // to ensure "number" is required (not null) if (number == null) @@ -152,7 +152,7 @@ namespace IO.Swagger.Model /// Gets or Sets Binary /// [DataMember(Name="binary", EmitDefaultValue=false)] - public byte[] Binary { get; set; } + public System.IO.Stream Binary { get; set; } /// /// Gets or Sets Date diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/List.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/List.cs index eb3f6dacfe28..df859d12dc7c 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/List.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/List.cs @@ -33,10 +33,10 @@ namespace IO.Swagger.Model /// /// Initializes a new instance of the class. /// - /// _123List. - public List(string _123List = default(string)) + /// _123list. + public List(string _123list = default(string)) { - this._123List = _123List; + this._123List = _123list; } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/OuterComposite.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/OuterComposite.cs index fa1ff0cb876b..e92aee48d81e 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/OuterComposite.cs @@ -36,7 +36,7 @@ namespace IO.Swagger.Model /// myNumber. /// myString. /// myBoolean. - public OuterComposite(OuterNumber myNumber = default(OuterNumber), OuterString myString = default(OuterString), OuterBoolean myBoolean = default(OuterBoolean)) + public OuterComposite(decimal? myNumber = default(decimal?), string myString = default(string), bool? myBoolean = default(bool?)) { this.MyNumber = myNumber; this.MyString = myString; @@ -47,19 +47,19 @@ namespace IO.Swagger.Model /// Gets or Sets MyNumber /// [DataMember(Name="my_number", EmitDefaultValue=false)] - public OuterNumber MyNumber { get; set; } + public decimal? MyNumber { get; set; } /// /// Gets or Sets MyString /// [DataMember(Name="my_string", EmitDefaultValue=false)] - public OuterString MyString { get; set; } + public string MyString { get; set; } /// /// Gets or Sets MyBoolean /// [DataMember(Name="my_boolean", EmitDefaultValue=false)] - public OuterBoolean MyBoolean { get; set; } + public bool? MyBoolean { get; set; } /// /// Returns the string presentation of the object