From 689da8f91520c007f8665ca0ead76173bed47e2a Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Mon, 17 Oct 2016 04:26:28 -0400 Subject: [PATCH] [csharp] Fix apiPackage,modelPackage,excludeTests (#4010) * [csharp] Fix apiPackage,modelPackage,excludeTests The apiPackage, modelPackage, and excludeTests values were not being populated correctly from external configs (passing -c filename to generator). This commit allows those properties to work correctly with the Csharp client generator. Previously the Api and Model namespaces were hard coded after additionalProperties for these were evaluated. The files which generate test files for models and api classes didn't honor the excludeTests option. * [csharp] Regenerate sample * [csharp] Fix modelPackage in README template --- .../languages/CSharpClientCodegen.java | 29 +++++++++++++----- .../src/main/resources/csharp/README.mustache | 12 +++----- .../src/main/resources/csharp/api.mustache | 4 +-- .../main/resources/csharp/api_doc.mustache | 6 ++-- .../main/resources/csharp/api_test.mustache | 4 +-- .../src/main/resources/csharp/model.mustache | 2 +- .../main/resources/csharp/model_doc.mustache | 2 +- .../main/resources/csharp/model_test.mustache | 4 +-- .../csharp/SwaggerClient/IO.Swagger.sln | 10 +++---- .../petstore/csharp/SwaggerClient/build.bat | 1 - .../csharp/SwaggerClient/docs/FakeApi.md | 6 ++-- .../src/IO.Swagger/Api/FakeApi.cs | 30 ++++++++++++------- .../src/IO.Swagger/IO.Swagger.csproj | 2 +- 13 files changed, 66 insertions(+), 46 deletions(-) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java index f1b43088b2..0dcaa6869b 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java @@ -21,6 +21,8 @@ import java.util.Iterator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static org.apache.commons.lang3.StringUtils.isEmpty; + public class CSharpClientCodegen extends AbstractCSharpCodegen { @SuppressWarnings({"unused", "hiding"}) private static final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); @@ -48,9 +50,6 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { modelTemplateFiles.put("model.mustache", ".cs"); apiTemplateFiles.put("api.mustache", ".cs"); - modelTestTemplateFiles.put("model_test.mustache", ".cs"); - apiTestTemplateFiles.put("api_test.mustache", ".cs"); - modelDocTemplateFiles.put("model_doc.mustache", ".md"); apiDocTemplateFiles.put("api_doc.mustache", ".md"); @@ -146,14 +145,22 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { Boolean.valueOf(additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP).toString())); } + if(isEmpty(apiPackage)) { + apiPackage = "Api"; + } + if(isEmpty(modelPackage)) { + modelPackage = "Model"; + } + clientPackage = "Client"; + Boolean excludeTests = false; if(additionalProperties.containsKey(CodegenConstants.EXCLUDE_TESTS)) { excludeTests = Boolean.valueOf(additionalProperties.get(CodegenConstants.EXCLUDE_TESTS).toString()); } - apiPackage = "Api"; - modelPackage = "Model"; - clientPackage = "Client"; + additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage); + + additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage); additionalProperties.put("clientPackage", clientPackage); @@ -248,15 +255,20 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("compile.mustache", "", "build.bat")); supportingFiles.add(new SupportingFile("compile-mono.sh.mustache", "", "build.sh")); - // shell script to run the nunit test - supportingFiles.add(new SupportingFile("mono_nunit_test.mustache", "", "mono_nunit_test.sh")); // copy package.config to nuget's standard location for project-level installs supportingFiles.add(new SupportingFile("packages.config.mustache", packageFolder + File.separator, "packages.config")); // .travis.yml for travis-ci.org CI supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml")); + // Only write out test related files if excludeTests is unset or explicitly set to false (see start of this method) if(Boolean.FALSE.equals(excludeTests)) { + // shell script to run the nunit test + supportingFiles.add(new SupportingFile("mono_nunit_test.mustache", "", "mono_nunit_test.sh")); + + modelTestTemplateFiles.put("model_test.mustache", ".cs"); + apiTestTemplateFiles.put("api_test.mustache", ".cs"); + supportingFiles.add(new SupportingFile("packages_test.config.mustache", testPackageFolder + File.separator, "packages.config")); } @@ -279,6 +291,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("Project.mustache", packageFolder, packageName + ".csproj")); if(Boolean.FALSE.equals(excludeTests)) { + // NOTE: This exists here rather than previous excludeTests block because the test project is considered an optional project file. supportingFiles.add(new SupportingFile("TestProject.mustache", testPackageFolder, testPackageName + ".csproj")); } } diff --git a/modules/swagger-codegen/src/main/resources/csharp/README.mustache b/modules/swagger-codegen/src/main/resources/csharp/README.mustache index 89af5dd54c..a2857964cb 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/README.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/README.mustache @@ -44,11 +44,9 @@ Run the following command to generate the DLL Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: ```csharp -using {{packageName}}.Api; +using {{packageName}}.{{apiPackage}}; using {{packageName}}.Client; -{{#modelPackage}} -using {{{.}}}; -{{/modelPackage}} +using {{packageName}}.{{modelPackage}}; ``` ## Getting Started @@ -56,11 +54,9 @@ using {{{.}}}; ```csharp using System; using System.Diagnostics; -using {{packageName}}.Api; +using {{packageName}}.{{apiPackage}}; using {{packageName}}.Client; -{{#modelPackage}} -using {{{.}}}; -{{/modelPackage}} +using {{packageName}}.{{modelPackage}}; namespace Example { diff --git a/modules/swagger-codegen/src/main/resources/csharp/api.mustache b/modules/swagger-codegen/src/main/resources/csharp/api.mustache index 807155e4a4..f62cabe42e 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api.mustache @@ -5,10 +5,10 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; using {{packageName}}.Client; -{{#hasImport}}using {{packageName}}.Model; +{{#hasImport}}using {{packageName}}.{{modelPackage}}; {{/hasImport}} -namespace {{packageName}}.Api +namespace {{packageName}}.{{apiPackage}} { {{#operations}} /// diff --git a/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache b/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache index 224450867a..8349db2e1c 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache @@ -1,4 +1,4 @@ -# {{packageName}}.Api.{{classname}}{{#description}} +# {{packageName}}.{{apiPackage}}.{{classname}}{{#description}} {{description}}{{/description}} All URIs are relative to *{{{basePath}}}* @@ -22,9 +22,9 @@ Method | HTTP request | Description ```csharp using System; using System.Diagnostics; -using {{packageName}}.Api; +using {{packageName}}.{{apiPackage}}; using {{packageName}}.Client; -using {{packageName}}.Model; +using {{packageName}}.{{modelPackage}}; namespace Example { diff --git a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache index 2f20508f33..0550080887 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache @@ -9,8 +9,8 @@ using RestSharp; using NUnit.Framework; using {{packageName}}.Client; -using {{packageName}}.Api; -{{#hasImport}}using {{packageName}}.Model; +using {{packageName}}.{{apiPackage}}; +{{#hasImport}}using {{packageName}}.{{modelPackage}}; {{/hasImport}} namespace {{packageName}}.Test diff --git a/modules/swagger-codegen/src/main/resources/csharp/model.mustache b/modules/swagger-codegen/src/main/resources/csharp/model.mustache index 9c9610e532..307f69131b 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/model.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/model.mustache @@ -18,7 +18,7 @@ using System.ComponentModel.DataAnnotations; {{#models}} {{#model}} -namespace {{packageName}}.Model +namespace {{packageName}}.{{modelPackage}} { {{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>modelGeneric}}{{/isEnum}} {{/model}} diff --git a/modules/swagger-codegen/src/main/resources/csharp/model_doc.mustache b/modules/swagger-codegen/src/main/resources/csharp/model_doc.mustache index aff3e7e0d1..112d472549 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/model_doc.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/model_doc.mustache @@ -1,6 +1,6 @@ {{#models}} {{#model}} -# {{{packageName}}}.Model.{{{classname}}} +# {{{packageName}}}.{{modelPackage}}.{{{classname}}} ## Properties Name | Type | Description | Notes diff --git a/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache index 233534a334..f059706af1 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache @@ -6,8 +6,8 @@ using System; using System.Linq; using System.IO; using System.Collections.Generic; -using {{packageName}}.Api; -using {{packageName}}.Model; +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.{{modelPackage}}; using {{packageName}}.Client; using System.Reflection; diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln index e6247e2a67..81bb70169d 100644 --- a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln +++ b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{473916C4-D026-4063-8A3D-34BC255A0E7A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{D6453B3C-D08D-41D7-A59B-DE1F3581D258}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{473916C4-D026-4063-8A3D-34BC255A0E7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{473916C4-D026-4063-8A3D-34BC255A0E7A}.Debug|Any CPU.Build.0 = Debug|Any CPU -{473916C4-D026-4063-8A3D-34BC255A0E7A}.Release|Any CPU.ActiveCfg = Release|Any CPU -{473916C4-D026-4063-8A3D-34BC255A0E7A}.Release|Any CPU.Build.0 = Release|Any CPU +{D6453B3C-D08D-41D7-A59B-DE1F3581D258}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{D6453B3C-D08D-41D7-A59B-DE1F3581D258}.Debug|Any CPU.Build.0 = Debug|Any CPU +{D6453B3C-D08D-41D7-A59B-DE1F3581D258}.Release|Any CPU.ActiveCfg = Release|Any CPU +{D6453B3C-D08D-41D7-A59B-DE1F3581D258}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/samples/client/petstore/csharp/SwaggerClient/build.bat b/samples/client/petstore/csharp/SwaggerClient/build.bat index ae94b120d7..a718ff4833 100644 --- a/samples/client/petstore/csharp/SwaggerClient/build.bat +++ b/samples/client/petstore/csharp/SwaggerClient/build.bat @@ -16,7 +16,6 @@ SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319 - if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')" .\nuget.exe install src\IO.Swagger\packages.config -o packages diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md index 106daec81b..7d5f96ce78 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md @@ -71,7 +71,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null) +> void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -110,11 +110,12 @@ namespace Example var date = 2013-10-20; // DateTime? | None (optional) var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) var password = password_example; // string | None (optional) + var callback = callback_example; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password); + apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } catch (Exception e) { @@ -142,6 +143,7 @@ Name | Type | Description | Notes **date** | **DateTime?**| None | [optional] **dateTime** | **DateTime?**| None | [optional] **password** | **string**| None | [optional] + **callback** | **string**| None | [optional] ### Return type 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 f6d4c85a6c..66bdfaf3b3 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 @@ -77,8 +77,9 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// None (optional) + /// None (optional) /// - void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null); + void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -100,8 +101,9 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// None (optional) + /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null); + ApiResponse TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); /// /// To test enum parameters /// @@ -180,8 +182,9 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// None (optional) + /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null); + System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -203,8 +206,9 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// None (optional) + /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); /// /// To test enum parameters /// @@ -526,10 +530,11 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// None (optional) + /// None (optional) /// - public void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null) + public void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) { - TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password); + TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } /// @@ -549,8 +554,9 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// None (optional) + /// None (optional) /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null) + public ApiResponse TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) { // verify the required parameter 'number' is set if (number == null) @@ -605,6 +611,7 @@ namespace IO.Swagger.Api if (date != null) localVarFormParams.Add("date", Configuration.ApiClient.ParameterToString(date)); // form parameter if (dateTime != null) localVarFormParams.Add("dateTime", Configuration.ApiClient.ParameterToString(dateTime)); // form parameter if (password != null) localVarFormParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // form parameter + if (callback != null) localVarFormParams.Add("callback", Configuration.ApiClient.ParameterToString(callback)); // form parameter // authentication (http_basic_test) required // http basic authentication required @@ -650,10 +657,11 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// None (optional) + /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) { - await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password); + await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -674,8 +682,9 @@ namespace IO.Swagger.Api /// None (optional) /// None (optional) /// None (optional) + /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) { // verify the required parameter 'number' is set if (number == null) @@ -730,6 +739,7 @@ namespace IO.Swagger.Api if (date != null) localVarFormParams.Add("date", Configuration.ApiClient.ParameterToString(date)); // form parameter if (dateTime != null) localVarFormParams.Add("dateTime", Configuration.ApiClient.ParameterToString(dateTime)); // form parameter if (password != null) localVarFormParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // form parameter + if (callback != null) localVarFormParams.Add("callback", Configuration.ApiClient.ParameterToString(callback)); // form parameter // authentication (http_basic_test) required // http basic authentication required diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj index 51cfaa98df..498c1bedf5 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj @@ -24,7 +24,7 @@ limitations under the License. Debug AnyCPU - {473916C4-D026-4063-8A3D-34BC255A0E7A} + {D6453B3C-D08D-41D7-A59B-DE1F3581D258} Library Properties IO.Swagger