From 4c656bb1d940dc729cadcf44caac5b6646098f0e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 1 May 2018 14:02:55 +0800 Subject: [PATCH] Update C# with Petstore OAS3 (#281) * update c# petstore with oas3 * update c# propertychanged with petstore oas3 * update c# netstandard with oas3 --- bin/openapi3/csharp-petstore-net-standard.sh | 32 ++ bin/openapi3/csharp-petstore.sh | 32 ++ .../csharp-property-changed-petstore.sh | 32 ++ .../petstore/csharp/SwaggerClient/README.md | 2 +- .../csharp/SwaggerClient/docs/FakeApi.md | 84 +----- .../csharp/SwaggerClient/docs/PetApi.md | 2 +- .../csharp/SwaggerClient/docs/StoreApi.md | 2 +- .../csharp/SwaggerClient/docs/UserApi.md | 8 +- .../IO.Swagger.Test/IO.Swagger.Test.csproj | 3 - .../src/IO.Swagger/Api/FakeApi.cs | 279 +++--------------- .../src/IO.Swagger/Api/StoreApi.cs | 2 + .../src/IO.Swagger/Api/UserApi.cs | 8 + .../src/IO.Swagger/Model/FormatTest.cs | 7 - .../csharp/SwaggerClientNetStandard/README.md | 2 +- .../SwaggerClientNetStandard/docs/FakeApi.md | 82 +---- .../SwaggerClientNetStandard/docs/StoreApi.md | 2 +- .../SwaggerClientNetStandard/docs/UserApi.md | 8 +- .../src/IO.Swagger/Api/FakeApi.cs | 279 +++--------------- .../src/IO.Swagger/Api/StoreApi.cs | 2 + .../src/IO.Swagger/Api/UserApi.cs | 8 + .../README.md | 2 +- .../docs/FakeApi.md | 84 +----- .../docs/PetApi.md | 2 +- .../docs/StoreApi.md | 2 +- .../docs/UserApi.md | 8 +- .../src/IO.Swagger/Api/FakeApi.cs | 279 +++--------------- .../src/IO.Swagger/Api/StoreApi.cs | 2 + .../src/IO.Swagger/Api/UserApi.cs | 8 + .../src/IO.Swagger/Model/FormatTest.cs | 7 - 29 files changed, 307 insertions(+), 963 deletions(-) create mode 100755 bin/openapi3/csharp-petstore-net-standard.sh create mode 100755 bin/openapi3/csharp-petstore.sh create mode 100755 bin/openapi3/csharp-property-changed-petstore.sh diff --git a/bin/openapi3/csharp-petstore-net-standard.sh b/bin/openapi3/csharp-petstore-net-standard.sh new file mode 100755 index 00000000000..54ad48b131f --- /dev/null +++ b/bin/openapi3/csharp-petstore-net-standard.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples/client/petstore/csharp/SwaggerClientNetStandard --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-standard.json" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/csharp-petstore.sh b/bin/openapi3/csharp-petstore.sh new file mode 100755 index 00000000000..5567ba7c9c9 --- /dev/null +++ b/bin/openapi3/csharp-petstore.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples/client/petstore/csharp/SwaggerClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/csharp-property-changed-petstore.sh b/bin/openapi3/csharp-property-changed-petstore.sh new file mode 100755 index 00000000000..6a168c8e2fa --- /dev/null +++ b/bin/openapi3/csharp-property-changed-petstore.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples/client/petstore/csharp/SwaggerClientWithPropertyChanged --additional-properties generatePropertyChanged=true --additional-properties packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5}" + +java $JAVA_OPTS -jar $executable $ags diff --git a/samples/client/petstore/csharp/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md index 92221df7c70..b5118467eac 100644 --- a/samples/client/petstore/csharp/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClient/README.md @@ -101,7 +101,6 @@ 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 @@ -135,6 +134,7 @@ 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) diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md index 61fffcfaa61..dba66786b0e 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md @@ -8,7 +8,6 @@ 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 @@ -18,7 +17,7 @@ Method | HTTP request | Description # **FakeOuterBooleanSerialize** -> bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null) +> bool? FakeOuterBooleanSerialize (bool? body = null) @@ -39,11 +38,11 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var booleanPostBody = true; // bool? | Input boolean as post body (optional) + var body = true; // bool? | Input boolean as post body (optional) try { - bool? result = apiInstance.FakeOuterBooleanSerialize(booleanPostBody); + bool? result = apiInstance.FakeOuterBooleanSerialize(body); Debug.WriteLine(result); } catch (Exception e) @@ -59,7 +58,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **booleanPostBody** | **bool?**| Input boolean as post body | [optional] + **body** | **bool?**| Input boolean as post body | [optional] ### Return type @@ -71,7 +70,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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) @@ -131,7 +130,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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) @@ -191,7 +190,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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) @@ -249,69 +248,10 @@ Name | Type | Description | Notes 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 + - **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) @@ -403,7 +343,7 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(); - var number = 8.14; // decimal? | None + var number = 1.2; // decimal? | None var _double = 1.2; // double? | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None @@ -445,7 +385,7 @@ Name | Type | Description | Notes **int64** | **long?**| None | [optional] **_float** | **float?**| None | [optional] **_string** | **string**| None | [optional] - **binary** | **System.IO.Stream****System.IO.Stream**| None | [optional] + **binary** | **System.IO.Stream**| None | [optional] **date** | **DateTime?**| None | [optional] **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] @@ -496,7 +436,7 @@ namespace Example 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) + var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -523,7 +463,7 @@ Name | Type | Description | Notes **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] + **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md index 013c6e2a412..d5a5b2f000e 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md @@ -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****System.IO.Stream**| file to upload | [optional] + **file** | **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 1603b33bcba..e77977b4957 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md @@ -247,7 +247,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/xml, application/json [[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/UserApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md index 1513014cb0c..eeb90fc64dd 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md @@ -69,7 +69,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -127,7 +127,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -185,7 +185,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -481,7 +481,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) 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 e2deba02ea2..38476de7860 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 @@ -84,9 +84,6 @@ Contact: apiteam@swagger.io IO.Swagger - - - 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 be6efbf09a3..714327b7ed1 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) + /// Input boolean as post body (optional) /// bool? - bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null); + bool? FakeOuterBooleanSerialize (bool? body = 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) + /// Input boolean as post body (optional) /// ApiResponse of bool? - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? booleanPostBody = null); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = null); /// /// /// @@ -109,29 +109,6 @@ namespace IO.Swagger.Api /// 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 /// /// @@ -213,7 +190,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// 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); @@ -231,7 +208,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) 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); /// @@ -287,9 +264,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of bool? - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? booleanPostBody = null); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null); /// /// @@ -298,9 +275,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of ApiResponse (bool?) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? booleanPostBody = null); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null); /// /// /// @@ -365,29 +342,6 @@ namespace IO.Swagger.Api /// 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 /// /// @@ -469,7 +423,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of void 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); @@ -487,7 +441,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse 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); /// @@ -638,11 +592,11 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// bool? - public bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null) + public bool? FakeOuterBooleanSerialize (bool? body = null) { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(booleanPostBody); + ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; } @@ -650,9 +604,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// ApiResponse of bool? - public ApiResponse< bool? > FakeOuterBooleanSerializeWithHttpInfo (bool? booleanPostBody = null) + public ApiResponse< bool? > FakeOuterBooleanSerializeWithHttpInfo (bool? body = null) { var localVarPath = "/fake/outer/boolean"; @@ -665,6 +619,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -676,13 +631,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (booleanPostBody != null && booleanPostBody.GetType() != typeof(byte[])) + if (body != null && body.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(booleanPostBody); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { - localVarPostBody = booleanPostBody; // byte array + localVarPostBody = body; // byte array } @@ -708,11 +663,11 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of bool? - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? booleanPostBody = null) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null) { - ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(booleanPostBody); + ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; } @@ -721,9 +676,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of ApiResponse (bool?) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? booleanPostBody = null) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null) { var localVarPath = "/fake/outer/boolean"; @@ -736,6 +691,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -747,13 +703,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (booleanPostBody != null && booleanPostBody.GetType() != typeof(byte[])) + if (body != null && body.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(booleanPostBody); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { - localVarPostBody = booleanPostBody; // byte array + localVarPostBody = body; // byte array } @@ -806,6 +762,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -877,6 +834,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -947,6 +905,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1018,6 +977,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1088,6 +1048,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1159,6 +1120,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1198,163 +1160,6 @@ namespace IO.Swagger.Api (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 /// @@ -1754,7 +1559,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// 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) { @@ -1772,7 +1577,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) 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) { @@ -1798,7 +1603,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter + if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "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 @@ -1837,7 +1642,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of void 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) { @@ -1856,7 +1661,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse 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) { @@ -1882,7 +1687,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter + if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "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 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 b694a9ee7fd..7577619a5b7 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 @@ -719,6 +719,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -794,6 +795,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); 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 8e5dd7f7e98..ca067ae7608 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 @@ -499,6 +499,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -571,6 +572,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -642,6 +644,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -714,6 +717,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -785,6 +789,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -857,6 +862,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1461,6 +1467,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1539,6 +1546,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); 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 078ad55f5b8..a90b5109f20 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 @@ -407,13 +407,6 @@ namespace IO.Swagger.Model yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); } - // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); - if (false == regexString.Match(this.String).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); - } - // Password (string) maxLength if(this.Password != null && this.Password.Length > 64) { diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/README.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/README.md index 718b992c5d6..2d9b1c27321 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/README.md +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/README.md @@ -79,7 +79,6 @@ 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 @@ -113,6 +112,7 @@ 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) diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/FakeApi.md index 0b43ebdbdfa..dba66786b0e 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/FakeApi.md @@ -8,7 +8,6 @@ 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 @@ -18,7 +17,7 @@ Method | HTTP request | Description # **FakeOuterBooleanSerialize** -> bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null) +> bool? FakeOuterBooleanSerialize (bool? body = null) @@ -39,11 +38,11 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var booleanPostBody = true; // bool? | Input boolean as post body (optional) + var body = true; // bool? | Input boolean as post body (optional) try { - bool? result = apiInstance.FakeOuterBooleanSerialize(booleanPostBody); + bool? result = apiInstance.FakeOuterBooleanSerialize(body); Debug.WriteLine(result); } catch (Exception e) @@ -59,7 +58,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **booleanPostBody** | **bool?**| Input boolean as post body | [optional] + **body** | **bool?**| Input boolean as post body | [optional] ### Return type @@ -71,7 +70,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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) @@ -131,7 +130,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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) @@ -191,7 +190,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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) @@ -249,69 +248,10 @@ Name | Type | Description | Notes 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 + - **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) @@ -403,7 +343,7 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(); - var number = 8.14; // decimal? | None + var number = 1.2; // decimal? | None var _double = 1.2; // double? | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None @@ -496,7 +436,7 @@ namespace Example 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) + var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -523,7 +463,7 @@ Name | Type | Description | Notes **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] + **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/StoreApi.md index 1603b33bcba..e77977b4957 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/StoreApi.md @@ -247,7 +247,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/xml, application/json [[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/SwaggerClientNetStandard/docs/UserApi.md b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/UserApi.md index 1513014cb0c..eeb90fc64dd 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/UserApi.md +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/docs/UserApi.md @@ -69,7 +69,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -127,7 +127,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -185,7 +185,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -481,7 +481,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) 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 3aee0b4f55b..cfc7491f5d3 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 @@ -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) + /// Input boolean as post body (optional) /// bool? - bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null); + bool? FakeOuterBooleanSerialize (bool? body = 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) + /// Input boolean as post body (optional) /// ApiResponse of bool? - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? booleanPostBody = null); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = null); /// /// /// @@ -109,29 +109,6 @@ namespace IO.Swagger.Api /// 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 /// /// @@ -213,7 +190,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// 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); @@ -231,7 +208,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) 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); /// @@ -287,9 +264,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of bool? - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? booleanPostBody = null); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null); /// /// @@ -298,9 +275,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of ApiResponse (bool?) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? booleanPostBody = null); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null); /// /// /// @@ -365,29 +342,6 @@ namespace IO.Swagger.Api /// 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 /// /// @@ -469,7 +423,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of void 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); @@ -487,7 +441,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse 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); /// @@ -638,11 +592,11 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// bool? - public bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null) + public bool? FakeOuterBooleanSerialize (bool? body = null) { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(booleanPostBody); + ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; } @@ -650,9 +604,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// ApiResponse of bool? - public ApiResponse< bool? > FakeOuterBooleanSerializeWithHttpInfo (bool? booleanPostBody = null) + public ApiResponse< bool? > FakeOuterBooleanSerializeWithHttpInfo (bool? body = null) { var localVarPath = "./fake/outer/boolean"; @@ -665,6 +619,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -676,13 +631,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (booleanPostBody != null && booleanPostBody.GetType() != typeof(byte[])) + if (body != null && body.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(booleanPostBody); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { - localVarPostBody = booleanPostBody; // byte array + localVarPostBody = body; // byte array } @@ -708,11 +663,11 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of bool? - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? booleanPostBody = null) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null) { - ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(booleanPostBody); + ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; } @@ -721,9 +676,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of ApiResponse (bool?) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? booleanPostBody = null) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null) { var localVarPath = "./fake/outer/boolean"; @@ -736,6 +691,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -747,13 +703,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (booleanPostBody != null && booleanPostBody.GetType() != typeof(byte[])) + if (body != null && body.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(booleanPostBody); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { - localVarPostBody = booleanPostBody; // byte array + localVarPostBody = body; // byte array } @@ -806,6 +762,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -877,6 +834,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -947,6 +905,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1018,6 +977,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1088,6 +1048,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1159,6 +1120,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1198,163 +1160,6 @@ namespace IO.Swagger.Api (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.Key, 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.Key, x => x.Value.ToString()), - null); - } - /// /// To test \"client\" model To test \"client\" model /// @@ -1754,7 +1559,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// 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) { @@ -1772,7 +1577,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) 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) { @@ -1798,7 +1603,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter + if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "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 @@ -1837,7 +1642,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of void 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) { @@ -1856,7 +1661,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse 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) { @@ -1882,7 +1687,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter + if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "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 diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/StoreApi.cs index 67131da4186..618df6efca6 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/StoreApi.cs @@ -719,6 +719,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -794,6 +795,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); diff --git a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/UserApi.cs b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/UserApi.cs index e6393552f07..f0f153728e1 100644 --- a/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/UserApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientNetStandard/src/IO.Swagger/Api/UserApi.cs @@ -499,6 +499,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -571,6 +572,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -642,6 +644,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -714,6 +717,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -785,6 +789,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -857,6 +862,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1461,6 +1467,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1539,6 +1546,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md index 92221df7c70..b5118467eac 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md @@ -101,7 +101,6 @@ 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 @@ -135,6 +134,7 @@ 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) diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md index 61fffcfaa61..dba66786b0e 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md @@ -8,7 +8,6 @@ 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 @@ -18,7 +17,7 @@ Method | HTTP request | Description # **FakeOuterBooleanSerialize** -> bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null) +> bool? FakeOuterBooleanSerialize (bool? body = null) @@ -39,11 +38,11 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var booleanPostBody = true; // bool? | Input boolean as post body (optional) + var body = true; // bool? | Input boolean as post body (optional) try { - bool? result = apiInstance.FakeOuterBooleanSerialize(booleanPostBody); + bool? result = apiInstance.FakeOuterBooleanSerialize(body); Debug.WriteLine(result); } catch (Exception e) @@ -59,7 +58,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **booleanPostBody** | **bool?**| Input boolean as post body | [optional] + **body** | **bool?**| Input boolean as post body | [optional] ### Return type @@ -71,7 +70,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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) @@ -131,7 +130,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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) @@ -191,7 +190,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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) @@ -249,69 +248,10 @@ Name | Type | Description | Notes 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 + - **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) @@ -403,7 +343,7 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(); - var number = 8.14; // decimal? | None + var number = 1.2; // decimal? | None var _double = 1.2; // double? | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None @@ -445,7 +385,7 @@ Name | Type | Description | Notes **int64** | **long?**| None | [optional] **_float** | **float?**| None | [optional] **_string** | **string**| None | [optional] - **binary** | **System.IO.Stream****System.IO.Stream**| None | [optional] + **binary** | **System.IO.Stream**| None | [optional] **date** | **DateTime?**| None | [optional] **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] @@ -496,7 +436,7 @@ namespace Example 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) + var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -523,7 +463,7 @@ Name | Type | Description | Notes **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] + **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md index 013c6e2a412..d5a5b2f000e 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md @@ -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****System.IO.Stream**| file to upload | [optional] + **file** | **System.IO.Stream**| file to upload | [optional] ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md index 1603b33bcba..e77977b4957 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md @@ -247,7 +247,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/xml, application/json [[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/SwaggerClientWithPropertyChanged/docs/UserApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/UserApi.md index 1513014cb0c..eeb90fc64dd 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/UserApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/UserApi.md @@ -69,7 +69,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -127,7 +127,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -185,7 +185,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -481,7 +481,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **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) 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 be6efbf09a3..714327b7ed1 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 @@ -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) + /// Input boolean as post body (optional) /// bool? - bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null); + bool? FakeOuterBooleanSerialize (bool? body = 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) + /// Input boolean as post body (optional) /// ApiResponse of bool? - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? booleanPostBody = null); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = null); /// /// /// @@ -109,29 +109,6 @@ namespace IO.Swagger.Api /// 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 /// /// @@ -213,7 +190,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// 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); @@ -231,7 +208,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) 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); /// @@ -287,9 +264,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of bool? - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? booleanPostBody = null); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null); /// /// @@ -298,9 +275,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of ApiResponse (bool?) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? booleanPostBody = null); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null); /// /// /// @@ -365,29 +342,6 @@ namespace IO.Swagger.Api /// 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 /// /// @@ -469,7 +423,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of void 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); @@ -487,7 +441,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse 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); /// @@ -638,11 +592,11 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// bool? - public bool? FakeOuterBooleanSerialize (bool? booleanPostBody = null) + public bool? FakeOuterBooleanSerialize (bool? body = null) { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(booleanPostBody); + ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; } @@ -650,9 +604,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// ApiResponse of bool? - public ApiResponse< bool? > FakeOuterBooleanSerializeWithHttpInfo (bool? booleanPostBody = null) + public ApiResponse< bool? > FakeOuterBooleanSerializeWithHttpInfo (bool? body = null) { var localVarPath = "/fake/outer/boolean"; @@ -665,6 +619,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -676,13 +631,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (booleanPostBody != null && booleanPostBody.GetType() != typeof(byte[])) + if (body != null && body.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(booleanPostBody); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { - localVarPostBody = booleanPostBody; // byte array + localVarPostBody = body; // byte array } @@ -708,11 +663,11 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of bool? - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? booleanPostBody = null) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null) { - ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(booleanPostBody); + ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; } @@ -721,9 +676,9 @@ namespace IO.Swagger.Api /// Test serialization of outer boolean types /// /// Thrown when fails to make API call - /// Input boolean as post body (optional) + /// Input boolean as post body (optional) /// Task of ApiResponse (bool?) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? booleanPostBody = null) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null) { var localVarPath = "/fake/outer/boolean"; @@ -736,6 +691,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -747,13 +703,13 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (booleanPostBody != null && booleanPostBody.GetType() != typeof(byte[])) + if (body != null && body.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(booleanPostBody); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { - localVarPostBody = booleanPostBody; // byte array + localVarPostBody = body; // byte array } @@ -806,6 +762,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -877,6 +834,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -947,6 +905,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1018,6 +977,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1088,6 +1048,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1159,6 +1120,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1198,163 +1160,6 @@ namespace IO.Swagger.Api (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 /// @@ -1754,7 +1559,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// 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) { @@ -1772,7 +1577,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) 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) { @@ -1798,7 +1603,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter + if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "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 @@ -1837,7 +1642,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of void 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) { @@ -1856,7 +1661,7 @@ namespace IO.Swagger.Api /// 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) + /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse 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) { @@ -1882,7 +1687,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter + if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "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 diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/StoreApi.cs index b694a9ee7fd..7577619a5b7 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/StoreApi.cs @@ -719,6 +719,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -794,6 +795,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/UserApi.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/UserApi.cs index 8e5dd7f7e98..ca067ae7608 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/UserApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/UserApi.cs @@ -499,6 +499,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -571,6 +572,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -642,6 +644,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -714,6 +717,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -785,6 +789,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -857,6 +862,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1461,6 +1467,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); @@ -1539,6 +1546,7 @@ namespace IO.Swagger.Api // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { + "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs index 0d92b1fc8c5..c69b4ca0775 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs @@ -430,13 +430,6 @@ namespace IO.Swagger.Model yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); } - // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); - if (false == regexString.Match(this.String).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); - } - // Password (string) maxLength if(this.Password != null && this.Password.Length > 64) {