From b84769d1e37d54ea5fe0c2220678f7f9ab9f05b8 Mon Sep 17 00:00:00 2001 From: wing328 Date: Mon, 29 May 2017 22:16:42 +0800 Subject: [PATCH] fix enum float value in C#, minor format fix in doc (#5726) --- .../languages/CSharpClientCodegen.java | 3 + .../src/main/resources/csharp/README.mustache | 22 +- .../main/resources/csharp/api_doc.mustache | 18 +- .../petstore/csharp/SwaggerClient/README.md | 3 +- .../csharp/SwaggerClient/docs/FakeApi.md | 7 - .../csharp/SwaggerClient/docs/PetApi.md | 8 - .../csharp/SwaggerClient/docs/StoreApi.md | 4 - .../csharp/SwaggerClient/docs/UserApi.md | 8 - .../csharp/SwaggerClientNetStandard/README.md | 22 +- .../SwaggerClientNetStandard/docs/FakeApi.md | 247 +++++- .../docs/OuterBoolean.md | 8 + .../docs/OuterComposite.md | 11 + .../docs/OuterNumber.md | 8 + .../docs/OuterString.md | 8 + .../SwaggerClientNetStandard/docs/PetApi.md | 8 - .../SwaggerClientNetStandard/docs/StoreApi.md | 4 - .../SwaggerClientNetStandard/docs/UserApi.md | 8 - .../src/IO.Swagger/Api/FakeApi.cs | 724 ++++++++++++++++++ .../src/IO.Swagger/Model/OuterBoolean.cs | 100 +++ .../src/IO.Swagger/Model/OuterComposite.cs | 144 ++++ .../src/IO.Swagger/Model/OuterNumber.cs | 100 +++ .../src/IO.Swagger/Model/OuterString.cs | 100 +++ .../README.md | 7 +- .../docs/FakeApi.md | 7 - .../docs/PetApi.md | 8 - .../docs/StoreApi.md | 4 - .../docs/UserApi.md | 8 - .../IO.Swagger.Test/IO.Swagger.Test.csproj | 3 +- .../src/IO.Swagger/Api/FakeApi.cs | 8 - .../src/IO.Swagger/IO.Swagger.csproj | 6 +- .../src/IO.Swagger/Model/OuterBoolean.cs | 2 +- .../src/IO.Swagger/Model/OuterComposite.cs | 2 +- .../src/IO.Swagger/Model/OuterNumber.cs | 2 +- .../src/IO.Swagger/Model/OuterString.cs | 2 +- 34 files changed, 1508 insertions(+), 116 deletions(-) create mode 100644 samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterBoolean.md create mode 100644 samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterComposite.md create mode 100644 samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterNumber.md create mode 100644 samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterString.md create mode 100644 samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterBoolean.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterComposite.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterNumber.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterString.cs diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java index ff0ae876a93..dd4b3e9f27c 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java @@ -560,6 +560,9 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { if ("int?".equalsIgnoreCase(datatype) || "long?".equalsIgnoreCase(datatype) || "double?".equalsIgnoreCase(datatype) || "float?".equalsIgnoreCase(datatype)) { return value; + } else if ("float?".equalsIgnoreCase(datatype)) { + // for float in C#, append "f". e.g. 3.14 => 3.14f + return value + "f"; } else { return "\"" + escapeText(value) + "\""; } diff --git a/modules/swagger-codegen/src/main/resources/csharp/README.mustache b/modules/swagger-codegen/src/main/resources/csharp/README.mustache index e48c6029f70..80e24376947 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/README.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/README.mustache @@ -102,18 +102,27 @@ namespace Example { public void main() { - {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}} +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} + {{#hasAuthMethods}} + {{#authMethods}} + {{#isBasic}} // Configure HTTP basic authorization: {{{name}}} Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD";{{/isBasic}}{{#isApiKey}} + Configuration.Default.Password = "YOUR_PASSWORD"; + {{/isBasic}} + {{#isApiKey}} // Configure API key authorization: {{{name}}} Configuration.Default.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer");{{/isApiKey}}{{#isOAuth}} + // Configuration.Default.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); + {{/isApiKey}} + {{#isOAuth}} // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";{{/isOAuth}}{{/authMethods}} - {{/hasAuthMethods}} + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + {{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} var apiInstance = new {{classname}}(); {{#allParams}} {{#isPrimitiveType}} @@ -136,9 +145,10 @@ namespace Example { Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); } +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} } } -}{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +} ``` diff --git a/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache b/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache index 9ef645bed3f..ff3cf4fc60a 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache @@ -32,18 +32,26 @@ namespace Example { public void main() { - {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}} + {{#hasAuthMethods}} + {{#authMethods}} + {{#isBasic}} // Configure HTTP basic authorization: {{{name}}} Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD";{{/isBasic}}{{#isApiKey}} + Configuration.Default.Password = "YOUR_PASSWORD"; + {{/isBasic}} + {{#isApiKey}} // Configure API key authorization: {{{name}}} Configuration.Default.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer");{{/isApiKey}}{{#isOAuth}} + // Configuration.Default.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); + {{/isApiKey}} + {{#isOAuth}} // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";{{/isOAuth}}{{/authMethods}} - {{/hasAuthMethods}} + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + {{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} var apiInstance = new {{classname}}(); {{#allParams}} {{#isPrimitiveType}} diff --git a/samples/client/petstore/csharp/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md index 576c89fed51..509276df700 100644 --- a/samples/client/petstore/csharp/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClient/README.md @@ -67,7 +67,7 @@ namespace Example { public void main() { - + var apiInstance = new FakeApi(); var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional) @@ -80,6 +80,7 @@ namespace Example { Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); } + } } } diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md index 1277461eb1d..41bddd87b49 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md @@ -35,7 +35,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional) @@ -96,7 +95,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) @@ -157,7 +155,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new OuterNumber(); // OuterNumber | Input number as post body (optional) @@ -218,7 +215,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new OuterString(); // OuterString | Input string as post body (optional) @@ -279,7 +275,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new ModelClient(); // ModelClient | client model @@ -341,7 +336,6 @@ namespace Example { public void main() { - // Configure HTTP basic authorization: http_basic_test Configuration.Default.Username = "YOUR_USERNAME"; Configuration.Default.Password = "YOUR_PASSWORD"; @@ -432,7 +426,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md index f3f49f5ed5b..148d49b8b88 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md @@ -36,7 +36,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -100,7 +99,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -166,7 +164,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -231,7 +228,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -296,7 +292,6 @@ namespace Example { public void main() { - // Configure API key authorization: api_key Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -363,7 +358,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -427,7 +421,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -495,7 +488,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md index bf2fdb1ed6d..1509a03158f 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md @@ -32,7 +32,6 @@ namespace Example { public void main() { - var apiInstance = new StoreApi(); var orderId = orderId_example; // string | ID of the order that needs to be deleted @@ -93,7 +92,6 @@ namespace Example { public void main() { - // Configure API key authorization: api_key Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -156,7 +154,6 @@ namespace Example { public void main() { - var apiInstance = new StoreApi(); var orderId = 789; // long? | ID of pet that needs to be fetched @@ -218,7 +215,6 @@ namespace Example { public void main() { - var apiInstance = new StoreApi(); var body = new Order(); // Order | order placed for purchasing the pet diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md index 78553f5b385..0ddde3f669c 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md @@ -36,7 +36,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var body = new User(); // User | Created user object @@ -97,7 +96,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var body = new List(); // List | List of user object @@ -158,7 +156,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var body = new List(); // List | List of user object @@ -219,7 +216,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var username = username_example; // string | The name that needs to be deleted @@ -280,7 +276,6 @@ 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. @@ -342,7 +337,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var username = username_example; // string | The user name for login var password = password_example; // string | The password for login in clear text @@ -406,7 +400,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); try @@ -463,7 +456,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var username = username_example; // string | name that need to be deleted var body = new User(); // User | Updated user object diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/README.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/README.md index d56551bfcbc..3af054e72a1 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/README.md +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/README.md @@ -47,20 +47,20 @@ namespace Example { public void main() { - + var apiInstance = new FakeApi(); - var body = new ModelClient(); // ModelClient | client model + var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional) try { - // To test \"client\" model - ModelClient result = apiInstance.TestClientModel(body); + OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); + Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); } + } } } @@ -73,6 +73,10 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*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* | [**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 @@ -109,10 +113,8 @@ Class | Method | HTTP request | Description - [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) @@ -127,12 +129,18 @@ 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.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/SwaggerClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/FakeApi.md index 82a3463dacb..41bddd87b49 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/FakeApi.md @@ -4,11 +4,255 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- +[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | [**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 + +# **FakeOuterBooleanSerialize** +> OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null) + + + +Test serialization of outer boolean types + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class FakeOuterBooleanSerializeExample + { + public void main() + { + var apiInstance = new FakeApi(); + var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional) + + try + { + OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body | [optional] + +### Return type + +[**OuterBoolean**](OuterBoolean.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **FakeOuterCompositeSerialize** +> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) + + + +Test serialization of object with outer number type + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class FakeOuterCompositeSerializeExample + { + public void main() + { + var apiInstance = new FakeApi(); + var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) + + try + { + OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **FakeOuterNumberSerialize** +> OuterNumber FakeOuterNumberSerialize (OuterNumber body = null) + + + +Test serialization of outer number types + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class FakeOuterNumberSerializeExample + { + public void main() + { + var apiInstance = new FakeApi(); + var body = new OuterNumber(); // OuterNumber | Input number as post body (optional) + + try + { + OuterNumber result = apiInstance.FakeOuterNumberSerialize(body); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterNumber**](OuterNumber.md)| Input number as post body | [optional] + +### Return type + +[**OuterNumber**](OuterNumber.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **FakeOuterStringSerialize** +> OuterString FakeOuterStringSerialize (OuterString body = null) + + + +Test serialization of outer string types + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class FakeOuterStringSerializeExample + { + public void main() + { + var apiInstance = new FakeApi(); + var body = new OuterString(); // OuterString | Input string as post body (optional) + + try + { + OuterString result = apiInstance.FakeOuterStringSerialize(body); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterString**](OuterString.md)| Input string as post body | [optional] + +### Return type + +[**OuterString**](OuterString.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) @@ -31,7 +275,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new ModelClient(); // ModelClient | client model @@ -93,7 +336,6 @@ namespace Example { public void main() { - // Configure HTTP basic authorization: http_basic_test Configuration.Default.Username = "YOUR_USERNAME"; Configuration.Default.Password = "YOUR_PASSWORD"; @@ -184,7 +426,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterBoolean.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterBoolean.md new file mode 100644 index 00000000000..84845b35e54 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterBoolean.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.OuterBoolean +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/SwaggerClientNetStandard/docs/OuterComposite.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterComposite.md new file mode 100644 index 00000000000..41fae66f136 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterComposite.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.OuterComposite +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MyNumber** | [**OuterNumber**](OuterNumber.md) | | [optional] +**MyString** | [**OuterString**](OuterString.md) | | [optional] +**MyBoolean** | [**OuterBoolean**](OuterBoolean.md) | | [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/SwaggerClientNetStandard/docs/OuterNumber.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterNumber.md new file mode 100644 index 00000000000..7c88274d6ee --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterNumber.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.OuterNumber +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/SwaggerClientNetStandard/docs/OuterString.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterString.md new file mode 100644 index 00000000000..524423a5dab --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/OuterString.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.OuterString +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/SwaggerClientNetStandard/docs/PetApi.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/PetApi.md index f3f49f5ed5b..148d49b8b88 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/PetApi.md +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/PetApi.md @@ -36,7 +36,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -100,7 +99,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -166,7 +164,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -231,7 +228,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -296,7 +292,6 @@ namespace Example { public void main() { - // Configure API key authorization: api_key Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -363,7 +358,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -427,7 +421,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -495,7 +488,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/StoreApi.md index bf2fdb1ed6d..1509a03158f 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/StoreApi.md @@ -32,7 +32,6 @@ namespace Example { public void main() { - var apiInstance = new StoreApi(); var orderId = orderId_example; // string | ID of the order that needs to be deleted @@ -93,7 +92,6 @@ namespace Example { public void main() { - // Configure API key authorization: api_key Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -156,7 +154,6 @@ namespace Example { public void main() { - var apiInstance = new StoreApi(); var orderId = 789; // long? | ID of pet that needs to be fetched @@ -218,7 +215,6 @@ namespace Example { public void main() { - var apiInstance = new StoreApi(); var body = new Order(); // Order | order placed for purchasing the pet diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/UserApi.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/UserApi.md index 78553f5b385..0ddde3f669c 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/UserApi.md +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/UserApi.md @@ -36,7 +36,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var body = new User(); // User | Created user object @@ -97,7 +96,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var body = new List(); // List | List of user object @@ -158,7 +156,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var body = new List(); // List | List of user object @@ -219,7 +216,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var username = username_example; // string | The name that needs to be deleted @@ -280,7 +276,6 @@ 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. @@ -342,7 +337,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var username = username_example; // string | The user name for login var password = password_example; // string | The password for login in clear text @@ -406,7 +400,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); try @@ -463,7 +456,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var username = username_example; // string | name that need to be deleted var body = new User(); // User | Updated user object diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/FakeApi.cs index 9c73f22c36b..ea748e60f0c 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/FakeApi.cs @@ -25,6 +25,90 @@ namespace IO.Swagger.Api { #region Synchronous Operations /// + /// + /// + /// + /// 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); + + /// + /// + /// + /// + /// 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); + /// + /// + /// + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// OuterComposite + OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null); + + /// + /// + /// + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// ApiResponse of OuterComposite + ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null); + /// + /// + /// + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// OuterNumber + OuterNumber FakeOuterNumberSerialize (OuterNumber body = null); + + /// + /// + /// + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// ApiResponse of OuterNumber + ApiResponse FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null); + /// + /// + /// + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// OuterString + OuterString FakeOuterStringSerialize (OuterString body = null); + + /// + /// + /// + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// ApiResponse of OuterString + ApiResponse FakeOuterStringSerializeWithHttpInfo (OuterString body = null); + /// /// To test \"client\" model /// /// @@ -130,6 +214,90 @@ namespace IO.Swagger.Api #endregion Synchronous Operations #region Asynchronous Operations /// + /// + /// + /// + /// 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); + + /// + /// + /// + /// + /// 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); + /// + /// + /// + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// Task of OuterComposite + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null); + + /// + /// + /// + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// Task of ApiResponse (OuterComposite) + System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null); + /// + /// + /// + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// Task of OuterNumber + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (OuterNumber body = null); + + /// + /// + /// + /// + /// Test serialization of outer number types + /// + /// 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); + /// + /// + /// + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// Task of OuterString + System.Threading.Tasks.Task FakeOuterStringSerializeAsync (OuterString body = null); + + /// + /// + /// + /// + /// Test serialization of outer string types + /// + /// 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); + /// /// To test \"client\" model /// /// @@ -344,6 +512,562 @@ namespace IO.Swagger.Api this.Configuration.AddDefaultHeader(key, value); } + /// + /// 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) + { + ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// 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) + { + + var localVarPath = "./fake/outer/boolean"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean))); + } + + /// + /// 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) + { + ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); + return localVarResponse.Data; + + } + + /// + /// 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) + { + + var localVarPath = "./fake/outer/boolean"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean))); + } + + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// OuterComposite + public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) + { + ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// ApiResponse of OuterComposite + public ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null) + { + + var localVarPath = "./fake/outer/composite"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); + } + + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// Task of OuterComposite + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null) + { + ApiResponse localVarResponse = await FakeOuterCompositeSerializeAsyncWithHttpInfo(body); + return localVarResponse.Data; + + } + + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// Task of ApiResponse (OuterComposite) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null) + { + + var localVarPath = "./fake/outer/composite"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); + } + + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// OuterNumber + public OuterNumber FakeOuterNumberSerialize (OuterNumber body = null) + { + ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// ApiResponse of OuterNumber + public ApiResponse< OuterNumber > FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null) + { + + var localVarPath = "./fake/outer/number"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber))); + } + + /// + /// Test serialization of outer number types + /// + /// 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) + { + ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); + return localVarResponse.Data; + + } + + /// + /// Test serialization of outer number types + /// + /// 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) + { + + var localVarPath = "./fake/outer/number"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber))); + } + + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// OuterString + public OuterString FakeOuterStringSerialize (OuterString body = null) + { + ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// ApiResponse of OuterString + public ApiResponse< OuterString > FakeOuterStringSerializeWithHttpInfo (OuterString body = null) + { + + var localVarPath = "./fake/outer/string"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString))); + } + + /// + /// Test serialization of outer string types + /// + /// 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) + { + ApiResponse localVarResponse = await FakeOuterStringSerializeAsyncWithHttpInfo(body); + return localVarResponse.Data; + + } + + /// + /// Test serialization of outer string types + /// + /// 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) + { + + var localVarPath = "./fake/outer/string"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString))); + } + /// /// To test \"client\" model To test \"client\" model /// diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterBoolean.cs b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterBoolean.cs new file mode 100644 index 00000000000..54f81745c24 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterBoolean.cs @@ -0,0 +1,100 @@ +/* + * 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.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace IO.Swagger.Model +{ + /// + /// OuterBoolean + /// + [DataContract] + public partial class OuterBoolean : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public OuterBoolean() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OuterBoolean {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OuterBoolean); + } + + /// + /// Returns true if OuterBoolean instances are equal + /// + /// Instance of OuterBoolean to be compared + /// Boolean + public bool Equals(OuterBoolean other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + return hash; + } + } + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterComposite.cs b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterComposite.cs new file mode 100644 index 00000000000..308c26d4f5c --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterComposite.cs @@ -0,0 +1,144 @@ +/* + * 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.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace IO.Swagger.Model +{ + /// + /// OuterComposite + /// + [DataContract] + public partial class OuterComposite : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// MyNumber. + /// MyString. + /// MyBoolean. + public OuterComposite(OuterNumber MyNumber = default(OuterNumber), OuterString MyString = default(OuterString), OuterBoolean MyBoolean = default(OuterBoolean)) + { + this.MyNumber = MyNumber; + this.MyString = MyString; + this.MyBoolean = MyBoolean; + } + + /// + /// Gets or Sets MyNumber + /// + [DataMember(Name="my_number", EmitDefaultValue=false)] + public OuterNumber MyNumber { get; set; } + /// + /// Gets or Sets MyString + /// + [DataMember(Name="my_string", EmitDefaultValue=false)] + public OuterString MyString { get; set; } + /// + /// Gets or Sets MyBoolean + /// + [DataMember(Name="my_boolean", EmitDefaultValue=false)] + public OuterBoolean MyBoolean { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OuterComposite {\n"); + sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); + sb.Append(" MyString: ").Append(MyString).Append("\n"); + sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OuterComposite); + } + + /// + /// Returns true if OuterComposite instances are equal + /// + /// Instance of OuterComposite to be compared + /// Boolean + public bool Equals(OuterComposite other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.MyNumber == other.MyNumber || + this.MyNumber != null && + this.MyNumber.Equals(other.MyNumber) + ) && + ( + this.MyString == other.MyString || + this.MyString != null && + this.MyString.Equals(other.MyString) + ) && + ( + this.MyBoolean == other.MyBoolean || + this.MyBoolean != null && + this.MyBoolean.Equals(other.MyBoolean) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.MyNumber != null) + hash = hash * 59 + this.MyNumber.GetHashCode(); + if (this.MyString != null) + hash = hash * 59 + this.MyString.GetHashCode(); + if (this.MyBoolean != null) + hash = hash * 59 + this.MyBoolean.GetHashCode(); + return hash; + } + } + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterNumber.cs b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterNumber.cs new file mode 100644 index 00000000000..103fd4f69dd --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterNumber.cs @@ -0,0 +1,100 @@ +/* + * 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.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace IO.Swagger.Model +{ + /// + /// OuterNumber + /// + [DataContract] + public partial class OuterNumber : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public OuterNumber() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OuterNumber {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OuterNumber); + } + + /// + /// Returns true if OuterNumber instances are equal + /// + /// Instance of OuterNumber to be compared + /// Boolean + public bool Equals(OuterNumber other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + return hash; + } + } + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterString.cs b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterString.cs new file mode 100644 index 00000000000..327fe620b59 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Model/OuterString.cs @@ -0,0 +1,100 @@ +/* + * 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.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace IO.Swagger.Model +{ + /// + /// OuterString + /// + [DataContract] + public partial class OuterString : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public OuterString() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OuterString {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OuterString); + } + + /// + /// Returns true if OuterString instances are equal + /// + /// Instance of OuterString to be compared + /// Boolean + public bool Equals(OuterString other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + return hash; + } + } + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md index e9f8551872b..509276df700 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md @@ -67,7 +67,7 @@ namespace Example { public void main() { - + var apiInstance = new FakeApi(); var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional) @@ -80,6 +80,7 @@ namespace Example { Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); } + } } } @@ -132,10 +133,8 @@ Class | Method | HTTP request | Description - [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) @@ -160,6 +159,8 @@ Class | Method | HTTP request | Description - [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/SwaggerClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md index 1277461eb1d..41bddd87b49 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md @@ -35,7 +35,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional) @@ -96,7 +95,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) @@ -157,7 +155,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new OuterNumber(); // OuterNumber | Input number as post body (optional) @@ -218,7 +215,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new OuterString(); // OuterString | Input string as post body (optional) @@ -279,7 +275,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var body = new ModelClient(); // ModelClient | client model @@ -341,7 +336,6 @@ namespace Example { public void main() { - // Configure HTTP basic authorization: http_basic_test Configuration.Default.Username = "YOUR_USERNAME"; Configuration.Default.Password = "YOUR_PASSWORD"; @@ -432,7 +426,6 @@ namespace Example { public void main() { - var apiInstance = new FakeApi(); var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md index f3f49f5ed5b..148d49b8b88 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md @@ -36,7 +36,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -100,7 +99,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -166,7 +164,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -231,7 +228,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -296,7 +292,6 @@ namespace Example { public void main() { - // Configure API key authorization: api_key Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -363,7 +358,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -427,7 +421,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -495,7 +488,6 @@ namespace Example { public void main() { - // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md index bf2fdb1ed6d..1509a03158f 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md @@ -32,7 +32,6 @@ namespace Example { public void main() { - var apiInstance = new StoreApi(); var orderId = orderId_example; // string | ID of the order that needs to be deleted @@ -93,7 +92,6 @@ namespace Example { public void main() { - // Configure API key authorization: api_key Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -156,7 +154,6 @@ namespace Example { public void main() { - var apiInstance = new StoreApi(); var orderId = 789; // long? | ID of pet that needs to be fetched @@ -218,7 +215,6 @@ namespace Example { public void main() { - var apiInstance = new StoreApi(); var body = new Order(); // Order | order placed for purchasing the pet diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/UserApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/UserApi.md index 78553f5b385..0ddde3f669c 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/UserApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/UserApi.md @@ -36,7 +36,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var body = new User(); // User | Created user object @@ -97,7 +96,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var body = new List(); // List | List of user object @@ -158,7 +156,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var body = new List(); // List | List of user object @@ -219,7 +216,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var username = username_example; // string | The name that needs to be deleted @@ -280,7 +276,6 @@ 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. @@ -342,7 +337,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var username = username_example; // string | The user name for login var password = password_example; // string | The password for login in clear text @@ -406,7 +400,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); try @@ -463,7 +456,6 @@ namespace Example { public void main() { - var apiInstance = new UserApi(); var username = username_example; // string | name that need to be deleted var body = new User(); // User | Updated user object diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj index a5e34c3155f..7cac6bb0121 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj @@ -66,7 +66,8 @@ Contact: apiteam@swagger.io - + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/FakeApi.cs index 76d88a6b174..953b7844ed2 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/FakeApi.cs @@ -579,7 +579,6 @@ namespace IO.Swagger.Api return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean))); - } /// @@ -650,7 +649,6 @@ namespace IO.Swagger.Api return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean))); - } /// @@ -720,7 +718,6 @@ namespace IO.Swagger.Api return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } /// @@ -791,7 +788,6 @@ namespace IO.Swagger.Api return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } /// @@ -861,7 +857,6 @@ namespace IO.Swagger.Api return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber))); - } /// @@ -932,7 +927,6 @@ namespace IO.Swagger.Api return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber))); - } /// @@ -1002,7 +996,6 @@ namespace IO.Swagger.Api return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString))); - } /// @@ -1073,7 +1066,6 @@ namespace IO.Swagger.Api return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString))); - } /// diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj index 3c33414c2c8..493a343283d 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj @@ -64,10 +64,8 @@ Contact: apiteam@swagger.io - - - - + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterBoolean.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterBoolean.cs index 2081641d2f8..8a830ee9602 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterBoolean.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterBoolean.cs @@ -127,7 +127,7 @@ namespace IO.Swagger.Model /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { + { yield break; } } diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterComposite.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterComposite.cs index 14f8b9d756c..e4b41a639fc 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterComposite.cs @@ -171,7 +171,7 @@ namespace IO.Swagger.Model /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { + { yield break; } } diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterNumber.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterNumber.cs index 1cfdf28555a..a60260550be 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterNumber.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterNumber.cs @@ -127,7 +127,7 @@ namespace IO.Swagger.Model /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { + { yield break; } } diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterString.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterString.cs index 9ee02e48db8..f4687db798f 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterString.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/OuterString.cs @@ -127,7 +127,7 @@ namespace IO.Swagger.Model /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { + { yield break; } }