diff --git a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index c7a19d07a9fc..4b8e53975129 100644 --- a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 --> @@ -47,16 +47,16 @@ OpenAPI spec version: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll @@ -72,7 +72,8 @@ OpenAPI spec version: 1.0.0 - + @@ -84,8 +85,5 @@ OpenAPI spec version: 1.0.0 Org.OpenAPITools - - - diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 9002b9f5a5ff..6928ef5f9e1b 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -23,7 +23,7 @@ sidebar_label: csharp |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src| -|targetFramework|The target .NET framework version.|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5**
.NET Framework 4.5+ compatible
**v5.0**
.NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
**uwp**
Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
|v4.5| +|targetFramework|The target .NET framework version.|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5**
.NET Framework 4.5 compatible
**v4.5.2**
.NET Framework 4.5.2+ compatible
**v5.0**
.NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
**uwp**
Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
|v4.5| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useCompareNetObjects|Use KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 2c30b432da05..6c2dcc7a714f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -37,6 +37,13 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { @SuppressWarnings({"hiding"}) private static final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); + private static final String NUNIT = "nunit"; + private static final String RESTSHARP = "restsharp"; + private static final String NEWTONSOFT_JSON = "newtonsoft-json"; + private static final String JSON_SUBTYPES = "json-subtypes"; + private static final String FODY = "fody"; + private static final String PROPERTYCHANGED_FODY = "propertychanged-fody"; + private static final String NET452 = "v4.5.2"; private static final String NET45 = "v4.5"; private static final String NET40 = "v4.0"; private static final String NET35 = "v3.5"; @@ -158,7 +165,8 @@ public CSharpClientCodegen() { frameworks = new ImmutableMap.Builder() .put(NET35, ".NET Framework 3.5 compatible") .put(NET40, ".NET Framework 4.0 compatible") - .put(NET45, ".NET Framework 4.5+ compatible") + .put(NET45, ".NET Framework 4.5 compatible") + .put(NET452, ".NET Framework 4.5.2+ compatible") .put(NETSTANDARD, ".NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)") .put(UWP, "Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)") .build(); @@ -328,8 +336,6 @@ public void processOpts() { setSupportsUWP(Boolean.TRUE); } else if (NET40.equals(this.targetFramework)) { additionalProperties.put(MCS_NET_VERSION_KEY, "4"); - additionalProperties.put("isNet40", true); - if (additionalProperties.containsKey(CodegenConstants.SUPPORTS_ASYNC)) { LOGGER.warn(".NET " + NET40 + " generator does not support async."); additionalProperties.remove(CodegenConstants.SUPPORTS_ASYNC); @@ -337,6 +343,10 @@ public void processOpts() { setTargetFrameworkNuget("net40"); setSupportsAsync(Boolean.FALSE); + } else if (NET452.equals(this.targetFramework)) { + additionalProperties.put(MCS_NET_VERSION_KEY, "4.5.2-api"); + setTargetFrameworkNuget("net452"); + setSupportsAsync(Boolean.TRUE); } else { additionalProperties.put(MCS_NET_VERSION_KEY, "4.5.2-api"); setTargetFrameworkNuget("net45"); @@ -706,6 +716,46 @@ public void setTargetFramework(String dotnetFramework) { } else { this.targetFramework = dotnetFramework; } + switch (targetFramework) { + case NET35: + additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "net35")); + additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "net35")); + additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "net35")); + additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "net35")); + break; + case NET40: + additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "net4")); + additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "net40")); + additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "net40")); + additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "net40")); + break; + case NET45: + additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "net45")); + additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "net45")); + additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "net45")); + additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "net45")); + break; + case NET452: + additionalProperties.put(RESTSHARP, new LibraryDependency("106.10.1", "net452")); + additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "net45")); + additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "net45")); + additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "net45")); + additionalProperties.put("isRestSharp_106_10_1_above", true); + break; + case UWP: + additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "uwp")); + additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "uwp")); + additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "uwp")); + additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "uwp")); + break; + case NETSTANDARD: + additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "netstandard1.3")); + additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "netstandard1.3")); + additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "netstandard1.3")); + additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "netstandard1.3")); + break; + } + LOGGER.info("Generating code for .NET Framework " + this.targetFramework); } @@ -854,6 +904,10 @@ public void setNetStandard(Boolean netStandard) { public void setGeneratePropertyChanged(final Boolean generatePropertyChanged) { this.generatePropertyChanged = generatePropertyChanged; + if (this.generatePropertyChanged) { + additionalProperties.put(FODY, new LibraryDependency("1.29.4", targetFrameworkNuget)); + additionalProperties.put(PROPERTYCHANGED_FODY, new LibraryDependency("1.51.3", targetFrameworkNuget)); + } } public void setUseCompareNetObjects(final Boolean useCompareNetObjects) { @@ -945,3 +999,13 @@ public String getNullableType(Schema p, String type) { } } + +class LibraryDependency { + String version; + String targetFramework; + + public LibraryDependency(String version, String targetFramework) { + this.version = version; + this.targetFramework = targetFramework; + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache index ad4e7f60cfa6..6e70b0d4a9c7 100644 --- a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache @@ -153,12 +153,12 @@ namespace {{packageName}}.Client {{/netStandard}} {{^netStandard}} {{^supportsUWP}} - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName{{#isRestSharp_106_10_1_above}}, param.Value.ContentLength{{/isRestSharp_106_10_1_above}}, param.Value.ContentType); {{/supportsUWP}} {{#supportsUWP}} byte[] paramWriter = null; param.Value.Writer = delegate (Stream stream) { paramWriter = ToByteArray(stream); }; - request.AddFile(param.Value.Name, paramWriter, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); + request.AddFile(param.Value.Name, paramWriter, param.Value.FileName, param.Value.ContentType); {{/supportsUWP}} {{/netStandard}} } @@ -215,7 +215,7 @@ namespace {{packageName}}.Client {{/supportsUWP}} {{#supportsUWP}} // Using async method to perform sync call (uwp-only) - var response = RestClient.ExecuteAsync(request).Result; + var response = RestClient.ExecuteTaskAsync(request).Result; {{/supportsUWP}} {{/netStandard}} InterceptResponse(request, response); diff --git a/modules/openapi-generator/src/main/resources/csharp/Project.mustache b/modules/openapi-generator/src/main/resources/csharp/Project.mustache index 896465deaa02..c1862f7cb8c2 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Project.mustache @@ -69,26 +69,26 @@ - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - {{binRelativePath}}\Newtonsoft.Json.12.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll + {{binRelativePath}}\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - {{binRelativePath}}\JsonSubTypes.1.6.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll + ..\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll + {{binRelativePath}}\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - $(SolutionDir)\packages\RestSharp.106.10.1\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll - ..\packages\RestSharp.106.10.1\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll - ..\..\packages\RestSharp.106.10.1\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll - {{binRelativePath}}\RestSharp.106.10.1\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll + $(SolutionDir)\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll + ..\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll + ..\..\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll + {{binRelativePath}}\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll {{#generatePropertyChanged}} - ..\..\packages\PropertyChanged.Fody.1.51.3\Lib\portable-net4+sl4+wp8+win8+wpa81+MonoAndroid16+MonoTouch40\PropertyChanged.dll + ..\..\packages\PropertyChanged.Fody.{{propertychanged-fody.version}}\Lib\portable-net4+sl4+wp8+win8+wpa81+MonoAndroid16+MonoTouch40\PropertyChanged.dll {{/generatePropertyChanged}} {{/netStandard}} @@ -110,7 +110,7 @@ {{#generatePropertyChanged}} - + {{/generatePropertyChanged}} {{/netStandard}} {{#netStandard}} diff --git a/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache b/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache index 0b1f35a53db2..3e850f2f3ac6 100644 --- a/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache @@ -59,28 +59,28 @@ - $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - {{binRelativePath}}\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll + {{binRelativePath}}\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - {{binRelativePath}}\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll + ..\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll + {{binRelativePath}}\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - $(SolutionDir)\packages\RestSharp.105.1.0\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll - {{binRelativePath}}\RestSharp.105.1.0\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll + $(SolutionDir)\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll + ..\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll + ..\..\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll + {{binRelativePath}}\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll - $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - {{binRelativePath}}\NUnit.3.11.0\lib\net45\nunit.framework.dll + $(SolutionDir)\packages\NUnit.{{nunit.version}}\lib\{{nunit.targetFramework}}\nunit.framework.dll + ..\packages\NUnit.{{nunit.version}}\lib\{{nunit.targetFramework}}\nunit.framework.dll + ..\..\packages\NUnit.{{nunit.version}}\lib\{{nunit.targetFramework}}\nunit.framework.dll + {{binRelativePath}}\NUnit.{{nunit.version}}\lib\{{nunit.targetFramework}}\nunit.framework.dll diff --git a/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache b/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache index 3271da17f82e..06c5788a35e0 100644 --- a/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache @@ -44,13 +44,13 @@ ${nuget_cmd} install src/{{packageName}}/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.12.0.1/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; -cp packages/RestSharp.105.1.0/lib/{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.5.2/lib/{{targetFrameworkNuget}}/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/Newtonsoft.Json.{{newtonsoft-json.version}}/lib/{{newtonsoft-json.targetFramework}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/RestSharp.{{restsharp.version}}/lib/{{restsharp.targetFramework}}/RestSharp.dll bin/RestSharp.dll; +cp packages/JsonSubTypes.{{json-subtypes.version}}/lib/{{json-subtypes.targetFramework}}/JsonSubTypes.dll bin/JsonSubTypes.dll {{#generatePropertyChanged}} -cp packages/Fody.1.29.4/Fody.dll bin/Fody.dll -cp packages/PropertyChanged.Fody.1.51.3/PropertyChanged.Fody.dll bin/PropertyChanged.Fody.dll -cp packages/PropertyChanged.Fody.1.51.3/Lib/dotnet/PropertyChanged.dll bin/PropertyChanged.dll +cp packages/Fody.{{fody.version}}/Fody.dll bin/Fody.dll +cp packages/PropertyChanged.Fody.{{propertychanged-fody.version}}/PropertyChanged.Fody.dll bin/PropertyChanged.Fody.dll +cp packages/PropertyChanged.Fody.{{propertychanged-fody.version}}/Lib/dotnet/PropertyChanged.dll bin/PropertyChanged.dll {{/generatePropertyChanged}} echo "[INFO] Run 'mcs' to build bin/{{{packageName}}}.dll" diff --git a/modules/openapi-generator/src/main/resources/csharp/compile.mustache b/modules/openapi-generator/src/main/resources/csharp/compile.mustache index 13f4569714b1..f80911357fd2 100644 --- a/modules/openapi-generator/src/main/resources/csharp/compile.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/compile.mustache @@ -15,13 +15,13 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll bin\JsonSubTypes.dll -copy packages\RestSharp.105.1.0\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll bin\RestSharp.dll +copy packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll bin\RestSharp.dll {{#generatePropertyChanged}} -copy packages\Fody.1.29.4\Fody.dll bin\Fody.dll -copy packages\PropertyChanged.Fody.1.51.3\PropertyChanged.Fody.dll bin\PropertyChanged.Fody.dll -copy packages\PropertyChanged.Fody.1.51.3\Lib\dotnet\PropertyChanged.dll bin\PropertyChanged.dll +copy packages\Fody.{{fody.version}}\Fody.dll bin\Fody.dll +copy packages\PropertyChanged.Fody.{{propertychanged-fody.version}}\PropertyChanged.Fody.dll bin\PropertyChanged.Fody.dll +copy packages\PropertyChanged.Fody.{{propertychanged-fody.version}}\Lib\dotnet\PropertyChanged.dll bin\PropertyChanged.dll {{/generatePropertyChanged}} %CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll {{#generatePropertyChanged}}/r:bin\Fody.dll;bin\PropertyChanged.Fody.dll;bin\PropertyChanged.dll{{/generatePropertyChanged}} /target:library /out:bin\{{packageName}}.dll /recurse:src\{{packageName}}\*.cs /doc:bin\{{packageName}}.xml diff --git a/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache b/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache index 4f310b050c1c..2cb30d650a5a 100644 --- a/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache @@ -23,10 +23,10 @@ {{/netStandard}} {{^netStandard}} - + {{/netStandard}} - - + + {{^netStandard}} diff --git a/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache b/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache index f77e5b0f0254..bb052b0d7050 100644 --- a/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache @@ -22,10 +22,10 @@ {{/netStandard}} {{^netStandard}} - + {{/netStandard}} - - + + {{^netStandard}} diff --git a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache index 003928a31a38..45ba3381de63 100644 --- a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache @@ -30,12 +30,12 @@ - - - + + + {{#generatePropertyChanged}} - - + + {{/generatePropertyChanged}} diff --git a/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache b/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache index c161e4f62ee8..56c892427aa7 100644 --- a/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache @@ -1,10 +1,11 @@ - - - + + + + {{#generatePropertyChanged}} - - + + {{/generatePropertyChanged}} diff --git a/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache b/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache index c7126b123d74..b6b6e7d980ff 100644 --- a/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache @@ -1,7 +1,7 @@ - - - - + + + + diff --git a/modules/openapi-generator/src/main/resources/csharp/project.json.mustache b/modules/openapi-generator/src/main/resources/csharp/project.json.mustache index 360ee69dd16f..9a85af07c5da 100644 --- a/modules/openapi-generator/src/main/resources/csharp/project.json.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/project.json.mustache @@ -3,8 +3,8 @@ "dependencies": { "FubarCoder.RestSharp.Portable.Core": "4.0.7", "FubarCoder.RestSharp.Portable.HttpClient": "4.0.7", - "Newtonsoft.Json": "12.0.3", - "JsonSubTypes": "1.6.0" + "Newtonsoft.Json": "{{newtonsoft-json.version}}", + "JsonSubTypes": "{{json-subtypes.version}}" }, "frameworks": { "{{targetFrameworkNuget}}": {} diff --git a/samples/client/petstore/csharp/OpenAPIClient/build.bat b/samples/client/petstore/csharp/OpenAPIClient/build.bat index 75153d5f899c..9849135797df 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/build.bat +++ b/samples/client/petstore/csharp/OpenAPIClient/build.bat @@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll %CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml diff --git a/samples/client/petstore/csharp/OpenAPIClient/build.sh b/samples/client/petstore/csharp/OpenAPIClient/build.sh index 7edc32f68862..15365d6014d8 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClient/build.sh @@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.12.0.1/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.5.2/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/JsonSubTypes.1.6.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs index f52b503cea2c..626c8e8329dd 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -58,8 +58,8 @@ public void Cleanup() [Test] public void InstanceTest() { - // TODO uncomment below to test 'IsInstanceOfType' AnotherFakeApi - //Assert.IsInstanceOfType(typeof(AnotherFakeApi), instance, "instance is a AnotherFakeApi"); + // TODO uncomment below to test 'IsInstanceOf' AnotherFakeApi + //Assert.IsInstanceOf(typeof(AnotherFakeApi), instance); } @@ -72,7 +72,7 @@ public void Call123TestSpecialTagsTest() // TODO uncomment below to test the method and replace null with proper value //ModelClient body = null; //var response = instance.Call123TestSpecialTags(body); - //Assert.IsInstanceOf (response, "response is ModelClient"); + //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); } } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index 8245961e05ff..2b5231a15133 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -58,8 +58,8 @@ public void Cleanup() [Test] public void InstanceTest() { - // TODO uncomment below to test 'IsInstanceOfType' FakeApi - //Assert.IsInstanceOfType(typeof(FakeApi), instance, "instance is a FakeApi"); + // TODO uncomment below to test 'IsInstanceOf' FakeApi + //Assert.IsInstanceOf(typeof(FakeApi), instance); } @@ -82,9 +82,9 @@ public void CreateXmlItemTest() public void FakeOuterBooleanSerializeTest() { // TODO uncomment below to test the method and replace null with proper value - //bool? body = null; + //bool body = null; //var response = instance.FakeOuterBooleanSerialize(body); - //Assert.IsInstanceOf (response, "response is bool?"); + //Assert.IsInstanceOf(typeof(bool), response, "response is bool"); } /// @@ -96,7 +96,7 @@ public void FakeOuterCompositeSerializeTest() // TODO uncomment below to test the method and replace null with proper value //OuterComposite body = null; //var response = instance.FakeOuterCompositeSerialize(body); - //Assert.IsInstanceOf (response, "response is OuterComposite"); + //Assert.IsInstanceOf(typeof(OuterComposite), response, "response is OuterComposite"); } /// @@ -106,9 +106,9 @@ public void FakeOuterCompositeSerializeTest() public void FakeOuterNumberSerializeTest() { // TODO uncomment below to test the method and replace null with proper value - //decimal? body = null; + //decimal body = null; //var response = instance.FakeOuterNumberSerialize(body); - //Assert.IsInstanceOf (response, "response is decimal?"); + //Assert.IsInstanceOf(typeof(decimal), response, "response is decimal"); } /// @@ -120,7 +120,7 @@ public void FakeOuterStringSerializeTest() // TODO uncomment below to test the method and replace null with proper value //string body = null; //var response = instance.FakeOuterStringSerialize(body); - //Assert.IsInstanceOf (response, "response is string"); + //Assert.IsInstanceOf(typeof(string), response, "response is string"); } /// @@ -157,7 +157,7 @@ public void TestClientModelTest() // TODO uncomment below to test the method and replace null with proper value //ModelClient body = null; //var response = instance.TestClientModel(body); - //Assert.IsInstanceOf (response, "response is ModelClient"); + //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); } /// @@ -167,18 +167,18 @@ public void TestClientModelTest() public void TestEndpointParametersTest() { // TODO uncomment below to test the method and replace null with proper value - //decimal? number = null; - //double? _double = null; + //decimal number = null; + //double _double = null; //string patternWithoutDelimiter = null; //byte[] _byte = null; - //int? integer = null; - //int? int32 = null; - //long? int64 = null; - //float? _float = null; + //int integer = null; + //int int32 = null; + //long int64 = null; + //float _float = null; //string _string = null; //System.IO.Stream binary = null; - //DateTime? date = null; - //DateTime? dateTime = null; + //DateTime date = null; + //DateTime dateTime = null; //string password = null; //string callback = null; //instance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -196,8 +196,8 @@ public void TestEnumParametersTest() //string enumHeaderString = null; //List enumQueryStringArray = null; //string enumQueryString = null; - //int? enumQueryInteger = null; - //double? enumQueryDouble = null; + //int enumQueryInteger = null; + //double enumQueryDouble = null; //List enumFormStringArray = null; //string enumFormString = null; //instance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -211,12 +211,12 @@ public void TestEnumParametersTest() public void TestGroupParametersTest() { // TODO uncomment below to test the method and replace null with proper value - //int? requiredStringGroup = null; - //bool? requiredBooleanGroup = null; - //long? requiredInt64Group = null; - //int? stringGroup = null; - //bool? booleanGroup = null; - //long? int64Group = null; + //int requiredStringGroup = null; + //bool requiredBooleanGroup = null; + //long requiredInt64Group = null; + //int stringGroup = null; + //bool booleanGroup = null; + //long int64Group = null; //instance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -246,6 +246,22 @@ public void TestJsonFormDataTest() } + /// + /// Test TestQueryParameterCollectionFormat + /// + [Test] + public void TestQueryParameterCollectionFormatTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List pipe = null; + //List ioutil = null; + //List http = null; + //List url = null; + //List context = null; + //instance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs index 01c0d864db41..f73f71bc2117 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -58,8 +58,8 @@ public void Cleanup() [Test] public void InstanceTest() { - // TODO uncomment below to test 'IsInstanceOfType' FakeClassnameTags123Api - //Assert.IsInstanceOfType(typeof(FakeClassnameTags123Api), instance, "instance is a FakeClassnameTags123Api"); + // TODO uncomment below to test 'IsInstanceOf' FakeClassnameTags123Api + //Assert.IsInstanceOf(typeof(FakeClassnameTags123Api), instance); } @@ -72,7 +72,7 @@ public void TestClassnameTest() // TODO uncomment below to test the method and replace null with proper value //ModelClient body = null; //var response = instance.TestClassname(body); - //Assert.IsInstanceOf (response, "response is ModelClient"); + //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); } } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs index 5a2aa03f4b7e..ef563f714424 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs @@ -1,4 +1,14 @@ -using System; +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; using System.IO; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -13,311 +23,161 @@ namespace Org.OpenAPITools.Test { - /// - /// Class for testing PetApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - public class PetApiTests - { - private PetApi instance; - - private long petId = 11088; - - /// - /// Create a Pet object - /// - private Pet createPet() - { - // create pet - Pet p = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); - p.Id = petId; - //p.Name = "Csharp test"; - p.Status = Pet.StatusEnum.Available; - // create Category object - Category category = new Category(); - category.Id = 56; - category.Name = "sample category name2"; - List photoUrls = new List(new String[] { "sample photoUrls" }); - // create Tag object - Tag tag = new Tag(); - tag.Id = petId; - tag.Name = "csharp sample tag name1"; - List tags = new List(new Tag[] { tag }); - p.Tags = tags; - p.Category = category; - p.PhotoUrls = photoUrls; - - return p; - } - - /// - /// Convert string to byte array - /// - private byte[] GetBytes(string str) - { - byte[] bytes = new byte[str.Length * sizeof(char)]; - System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length); - return bytes; - } - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new PetApi(); - - // create pet - Pet p = createPet(); - - // add pet before testing - PetApi petApi = new PetApi("http://petstore.swagger.io/v2/"); - petApi.AddPet(p); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - // remove the pet after testing - PetApi petApi = new PetApi(); - petApi.DeletePet(petId, "test key"); - } - - /// - /// Test an instance of PetApi - /// - [Test] - public void InstanceTest() - { - Assert.IsInstanceOf(typeof(PetApi), instance); - } - - - /// - /// Test AddPet - /// - [Test] - public void AddPetTest() - { - // create pet - Pet p = createPet(); - instance.AddPet(p); - } - - /// - /// Test DeletePet - /// - [Test] - public void DeletePetTest() - { - // no need to test as it'c covered by Cleanup() already - } - - /// - /// Test FindPetsByStatus - /// - [Test] - public void FindPetsByStatusTest() - { - PetApi petApi = new PetApi(); - List tagsList = new List(new String[] { "available" }); - - List listPet = petApi.FindPetsByTags(tagsList); - foreach (Pet pet in listPet) // Loop through List with foreach. - { - Assert.IsInstanceOf(typeof(Pet), pet); - Assert.AreEqual("csharp sample tag name1", pet.Tags[0]); - } - } - - /// - /// Test FindPetsByTags - /// - [Test] - public void FindPetsByTagsTest() - { - List tags = new List(new String[] { "pet" }); - var response = instance.FindPetsByTags(tags); - Assert.IsInstanceOf(typeof(List), response); - } - - /// - /// Test GetPetById - /// - [Test] - public void GetPetByIdTest() - { - // set timeout to 10 seconds - Configuration c1 = new Configuration(); - c1.Timeout = 10000; - c1.UserAgent = "TEST_USER_AGENT"; - - PetApi petApi = new PetApi(c1); - Pet response = petApi.GetPetById(petId); - Assert.IsInstanceOf(typeof(Pet), response); - - Assert.AreEqual("Csharp test", response.Name); - Assert.AreEqual(Pet.StatusEnum.Available, response.Status); - - Assert.IsInstanceOf(typeof(List), response.Tags); - Assert.AreEqual(petId, response.Tags[0].Id); - Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name); - - Assert.IsInstanceOf(typeof(List), response.PhotoUrls); - Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]); - - Assert.IsInstanceOf(typeof(Category), response.Category); - Assert.AreEqual(56, response.Category.Id); - Assert.AreEqual("sample category name2", response.Category.Name); - } - - /// - /// Test GetPetByIdAsync - /// - [Test()] - public void TestGetPetByIdAsync() - { - PetApi petApi = new PetApi(); - var task = petApi.GetPetByIdAsync(petId); - Pet response = task.Result; - Assert.IsInstanceOf(typeof(Pet), response); - - Assert.AreEqual("Csharp test", response.Name); - Assert.AreEqual(Pet.StatusEnum.Available, response.Status); - - Assert.IsInstanceOf(typeof(List), response.Tags); - Assert.AreEqual(petId, response.Tags[0].Id); - Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name); - - Assert.IsInstanceOf(typeof(List), response.PhotoUrls); - Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]); - - Assert.IsInstanceOf(typeof(Category), response.Category); - Assert.AreEqual(56, response.Category.Id); - Assert.AreEqual("sample category name2", response.Category.Name); - } - - /// - /// Test GetPetByIdAsyncWithHttpInfo - /// - [Test()] - public void TestGetPetByIdAsyncWithHttpInfo() - { - PetApi petApi = new PetApi(); - var task = petApi.GetPetByIdAsyncWithHttpInfo(petId); - - Assert.AreEqual(200, task.Result.StatusCode); - Assert.IsTrue(task.Result.Headers.ContainsKey("Content-Type")); - Assert.AreEqual(task.Result.Headers["Content-Type"], "application/json"); - - Pet response = task.Result.Data; - Assert.IsInstanceOf(typeof(Pet), response); - - Assert.AreEqual("Csharp test", response.Name); - Assert.AreEqual(Pet.StatusEnum.Available, response.Status); - - Assert.IsInstanceOf(typeof(List), response.Tags); - Assert.AreEqual(petId, response.Tags[0].Id); - Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name); - - Assert.IsInstanceOf(typeof(List), response.PhotoUrls); - Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]); - - Assert.IsInstanceOf(typeof(Category), response.Category); - Assert.AreEqual(56, response.Category.Id); - Assert.AreEqual("sample category name2", response.Category.Name); - } - - /// - /// Test UpdatePet - /// - [Test] - public void UpdatePetTest() - { - // create pet - Pet p = createPet(); - instance.UpdatePet(p); - } - - /// - /// Test UpdatePetWithForm - /// - [Test] - public void UpdatePetWithFormTest() - { - PetApi petApi = new PetApi(); - petApi.UpdatePetWithForm(petId, "new form name", "pending"); - - Pet response = petApi.GetPetById(petId); - Assert.IsInstanceOf(typeof(Pet), response); - Assert.IsInstanceOf(typeof(Category), response.Category); - Assert.IsInstanceOf(typeof(List), response.Tags); - - Assert.AreEqual("new form name", response.Name); - Assert.AreEqual(Pet.StatusEnum.Pending, response.Status); - - Assert.AreEqual(petId, response.Tags[0].Id); - Assert.AreEqual(56, response.Category.Id); - - // test optional parameter - petApi.UpdatePetWithForm(petId, "new form name2"); - Pet response2 = petApi.GetPetById(petId); - Assert.AreEqual("new form name2", response2.Name); - } - - /// - /// Test UploadFile - /// - [Test] - public void UploadFileTest() - { - Assembly _assembly = Assembly.GetExecutingAssembly(); - Stream _imageStream = _assembly.GetManifestResourceStream("Org.OpenAPITools.Test.linux-logo.png"); - PetApi petApi = new PetApi(); - // test file upload with form parameters - petApi.UploadFile(petId, "new form name", _imageStream); - - // test file upload without any form parameters - // using optional parameter syntax introduced at .net 4.0 - petApi.UploadFile(petId: petId, file: _imageStream); - - } - - /// - /// Test status code - /// - [Test()] - public void TestStatusCodeAndHeader() - { - PetApi petApi = new PetApi(); - var response = petApi.GetPetByIdWithHttpInfo(petId); - Assert.AreEqual(response.StatusCode, 200); - Assert.IsTrue(response.Headers.ContainsKey("Content-Type")); - Assert.AreEqual(response.Headers["Content-Type"], "application/json"); - } - - /// - /// Test default header (should be deprecated - /// - [Test()] - public void TestDefaultHeader() - { - PetApi petApi = new PetApi(); - // commented out the warning test below as it's confirmed the warning is working as expected - // there should be a warning for using AddDefaultHeader (deprecated) below - //petApi.AddDefaultHeader ("header_key", "header_value"); - // the following should be used instead as suggested in the doc - petApi.Configuration.AddDefaultHeader("header_key2", "header_value2"); - - } - - } - -} \ No newline at end of file + /// + /// Class for testing PetApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class PetApiTests + { + private PetApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new PetApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOf' PetApi + //Assert.IsInstanceOf(typeof(PetApi), instance); + } + + + /// + /// Test AddPet + /// + [Test] + public void AddPetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Pet body = null; + //instance.AddPet(body); + + } + + /// + /// Test DeletePet + /// + [Test] + public void DeletePetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long petId = null; + //string apiKey = null; + //instance.DeletePet(petId, apiKey); + + } + + /// + /// Test FindPetsByStatus + /// + [Test] + public void FindPetsByStatusTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List status = null; + //var response = instance.FindPetsByStatus(status); + //Assert.IsInstanceOf(typeof(List), response, "response is List"); + } + + /// + /// Test FindPetsByTags + /// + [Test] + public void FindPetsByTagsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List tags = null; + //var response = instance.FindPetsByTags(tags); + //Assert.IsInstanceOf(typeof(List), response, "response is List"); + } + + /// + /// Test GetPetById + /// + [Test] + public void GetPetByIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long petId = null; + //var response = instance.GetPetById(petId); + //Assert.IsInstanceOf(typeof(Pet), response, "response is Pet"); + } + + /// + /// Test UpdatePet + /// + [Test] + public void UpdatePetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Pet body = null; + //instance.UpdatePet(body); + + } + + /// + /// Test UpdatePetWithForm + /// + [Test] + public void UpdatePetWithFormTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long petId = null; + //string name = null; + //string status = null; + //instance.UpdatePetWithForm(petId, name, status); + + } + + /// + /// Test UploadFile + /// + [Test] + public void UploadFileTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long petId = null; + //string additionalMetadata = null; + //System.IO.Stream file = null; + //var response = instance.UploadFile(petId, additionalMetadata, file); + //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); + } + + /// + /// Test UploadFileWithRequiredFile + /// + [Test] + public void UploadFileWithRequiredFileTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long petId = null; + //System.IO.Stream requiredFile = null; + //string additionalMetadata = null; + //var response = instance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs index 41d065c8be9b..969eaa7a2abb 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -58,8 +58,8 @@ public void Cleanup() [Test] public void InstanceTest() { - // TODO uncomment below to test 'IsInstanceOfType' StoreApi - //Assert.IsInstanceOfType(typeof(StoreApi), instance, "instance is a StoreApi"); + // TODO uncomment below to test 'IsInstanceOf' StoreApi + //Assert.IsInstanceOf(typeof(StoreApi), instance); } @@ -83,7 +83,7 @@ public void GetInventoryTest() { // TODO uncomment below to test the method and replace null with proper value //var response = instance.GetInventory(); - //Assert.IsInstanceOf> (response, "response is Dictionary"); + //Assert.IsInstanceOf(typeof(Dictionary), response, "response is Dictionary"); } /// @@ -93,9 +93,9 @@ public void GetInventoryTest() public void GetOrderByIdTest() { // TODO uncomment below to test the method and replace null with proper value - //long? orderId = null; + //long orderId = null; //var response = instance.GetOrderById(orderId); - //Assert.IsInstanceOf (response, "response is Order"); + //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); } /// @@ -107,7 +107,7 @@ public void PlaceOrderTest() // TODO uncomment below to test the method and replace null with proper value //Order body = null; //var response = instance.PlaceOrder(body); - //Assert.IsInstanceOf (response, "response is Order"); + //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); } } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index befdfe04de37..a79cad431306 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -58,8 +58,8 @@ public void Cleanup() [Test] public void InstanceTest() { - // TODO uncomment below to test 'IsInstanceOfType' UserApi - //Assert.IsInstanceOfType(typeof(UserApi), instance, "instance is a UserApi"); + // TODO uncomment below to test 'IsInstanceOf' UserApi + //Assert.IsInstanceOf(typeof(UserApi), instance); } @@ -120,7 +120,7 @@ public void GetUserByNameTest() // TODO uncomment below to test the method and replace null with proper value //string username = null; //var response = instance.GetUserByName(username); - //Assert.IsInstanceOf (response, "response is User"); + //Assert.IsInstanceOf(typeof(User), response, "response is User"); } /// @@ -133,7 +133,7 @@ public void LoginUserTest() //string username = null; //string password = null; //var response = instance.LoginUser(username, password); - //Assert.IsInstanceOf (response, "response is string"); + //Assert.IsInstanceOf(typeof(string), response, "response is string"); } /// diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs deleted file mode 100644 index d9637bd92e4f..000000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs +++ /dev/null @@ -1,139 +0,0 @@ -using NUnit.Framework; -using System; -using System.Collections.Generic; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Test -{ - public class ApiClientTests - { - public ApiClientTests() - { - } - - [TearDown()] - public void TearDown() - { - // Reset to default, just in case - Configuration.Default.DateTimeFormat = "o"; - } - - /// - /// Test SelectHeaderContentType - /// - [Test()] - public void TestSelectHeaderContentType() - { - ApiClient api = new ApiClient(); - String[] contentTypes = new String[] { "application/json", "application/xml" }; - Assert.AreEqual("application/json", api.SelectHeaderContentType(contentTypes)); - - contentTypes = new String[] { "application/xml" }; - Assert.AreEqual("application/xml", api.SelectHeaderContentType(contentTypes)); - - contentTypes = new String[] { }; - Assert.AreEqual("application/json", api.SelectHeaderContentType(contentTypes)); - } - - /// - /// Test ParameterToString - /// - [Test()] - public void TestParameterToString() - { - ApiClient api = new ApiClient(); - - // test array of string - List statusList = new List(new String[] { "available", "sold" }); - Assert.AreEqual("available,sold", api.ParameterToString(statusList)); - - // test array of int - List numList = new List(new int[] { 1, 37 }); - Assert.AreEqual("1,37", api.ParameterToString(numList)); - } - - [Test()] - public void TestParameterToStringForDateTime() - { - ApiClient api = new ApiClient(); - - // test datetime - DateTime dateUtc = DateTime.Parse("2008-04-10T13:30:00.0000000z", null, System.Globalization.DateTimeStyles.RoundtripKind); - Assert.AreEqual("2008-04-10T13:30:00.0000000Z", api.ParameterToString(dateUtc)); - - // test datetime with no timezone - DateTime dateWithNoTz = DateTime.Parse("2008-04-10T13:30:00.000", null, System.Globalization.DateTimeStyles.RoundtripKind); - Assert.AreEqual("2008-04-10T13:30:00.0000000", api.ParameterToString(dateWithNoTz)); - } - - // The test below only passes when running at -04:00 timezone - [Ignore("The test below only passes when running at -04:00 timezone")] - public void TestParameterToStringWithTimeZoneForDateTime() - { - ApiClient api = new ApiClient(); - // test datetime with a time zone - DateTimeOffset dateWithTz = DateTimeOffset.Parse("2008-04-10T13:30:00.0000000-04:00", null, System.Globalization.DateTimeStyles.RoundtripKind); - Assert.AreEqual("2008-04-10T13:30:00.0000000-04:00", api.ParameterToString(dateWithTz)); - } - - [Test()] - public void TestParameterToStringForDateTimeWithUFormat() - { - // Setup the DateTimeFormat across all of the calls - Configuration.Default.DateTimeFormat = "u"; - ApiClient api = new ApiClient(); - - // test datetime - DateTime dateUtc = DateTime.Parse("2009-06-15 20:45:30Z", null, System.Globalization.DateTimeStyles.RoundtripKind); - Assert.AreEqual("2009-06-15 20:45:30Z", api.ParameterToString(dateUtc)); - } - - [Test()] - public void TestParameterToStringForDateTimeWithCustomFormat() - { - // Setup the DateTimeFormat across all of the calls - Configuration.Default.DateTimeFormat = "dd/MM/yy HH:mm:ss"; - ApiClient api = new ApiClient(); - - // test datetime - DateTime dateUtc = DateTime.Parse("2009-06-15 20:45:30Z", null, System.Globalization.DateTimeStyles.RoundtripKind); - Assert.AreEqual("15/06/09 20:45:30", api.ParameterToString(dateUtc)); - } - - [Test()] - public void TestSanitizeFilename() - { - Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("sun.gif")); - Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("../sun.gif")); - Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("/var/tmp/sun.gif")); - Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("./sun.gif")); - - Assert.AreEqual("sun", ApiClient.SanitizeFilename("sun")); - Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("..\\sun.gif")); - Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("\\var\\tmp\\sun.gif")); - Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename("c:\\var\\tmp\\sun.gif")); - Assert.AreEqual("sun.gif", ApiClient.SanitizeFilename(".\\sun.gif")); - - } - - [Test()] - public void TestApiClientInstance() - { - PetApi p1 = new PetApi(); - PetApi p2 = new PetApi(); - - Configuration c1 = new Configuration(); // using default ApiClient - PetApi p3 = new PetApi(c1); - - // ensure both using the same default ApiClient - Assert.AreSame(p1.Configuration.ApiClient, p2.Configuration.ApiClient); - Assert.AreSame(p1.Configuration.ApiClient, Configuration.Default.ApiClient); - - // ensure both using the same default ApiClient - Assert.AreSame(p3.Configuration.ApiClient, c1.ApiClient); - - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ConfigurationTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ConfigurationTests.cs deleted file mode 100644 index 53d15e3a6057..000000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ConfigurationTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -using NUnit.Framework; -using System; -using System.Collections.Generic; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Test -{ - public class ConfigurationTests - { - public ConfigurationTests() - { - } - - [TearDown()] - public void TearDown() - { - // Reset to default, just in case - Configuration.Default.DateTimeFormat = "o"; - } - - [Test()] - public void TestAuthentication() - { - Configuration c = new Configuration(); - c.Username = "test_username"; - c.Password = "test_password"; - - c.ApiKey["api_key_identifier"] = "1233456778889900"; - c.ApiKeyPrefix["api_key_identifier"] = "PREFIX"; - Assert.AreEqual(c.GetApiKeyWithPrefix("api_key_identifier"), "PREFIX 1233456778889900"); - - } - - [Test()] - public void TestBasePath() - { - PetApi p = new PetApi("http://new-basepath.com"); - Assert.AreEqual(p.Configuration.ApiClient.RestClient.BaseUrl, "http://new-basepath.com"); - // Given that PetApi is initailized with a base path, a new configuration (with a new ApiClient) - // is created by default - Assert.AreNotSame(p.Configuration, Configuration.Default); - } - - [Test()] - public void TestDateTimeFormat_Default() - { - // Should default to the Round-trip Format Specifier - "o" - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - Assert.AreEqual("o", Configuration.Default.DateTimeFormat); - } - - [Test()] - public void TestDateTimeFormat_UType() - { - Configuration.Default.DateTimeFormat = "u"; - - Assert.AreEqual("u", Configuration.Default.DateTimeFormat); - } - - [Test()] - public void TestDefautlConfiguration() - { - PetApi p1 = new PetApi(); - PetApi p2 = new PetApi(); - Assert.AreSame(p1.Configuration, p2.Configuration); - // same as the default - Assert.AreSame(p1.Configuration, Configuration.Default); - - Configuration c = new Configuration(); - Assert.AreNotSame(c, p1.Configuration); - - PetApi p3 = new PetApi(c); - // same as c - Assert.AreSame(p3.Configuration, c); - // not same as default - Assert.AreNotSame(p3.Configuration, p1.Configuration); - - } - - [Test()] - public void TestUsage() - { - // basic use case using default base URL - PetApi p1 = new PetApi(); - Assert.AreSame(p1.Configuration, Configuration.Default, "PetApi should use default configuration"); - - // using a different base URL - PetApi p2 = new PetApi("http://new-base-url.com/"); - Assert.AreEqual(p2.Configuration.ApiClient.RestClient.BaseUrl.ToString(), "http://new-base-url.com/"); - - // using a different configuration - Configuration c1 = new Configuration(); - PetApi p3 = new PetApi(c1); - Assert.AreSame(p3.Configuration, c1); - - } - - [Test()] - public void TestTimeout() - { - Configuration c1 = new Configuration(); - Assert.AreEqual(100000, c1.Timeout); // default vaue - - c1.Timeout = 50000; - Assert.AreEqual(50000, c1.Timeout); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs index 799a923c5711..031514307291 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void AdditionalPropertiesAnyTypeInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" AdditionalPropertiesAnyType - //Assert.IsInstanceOfType (instance, "variable 'instance' is a AdditionalPropertiesAnyType"); + // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesAnyType + //Assert.IsInstanceOf(typeof(AdditionalPropertiesAnyType), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs index 7543ec159c38..e75114595b66 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void AdditionalPropertiesArrayInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" AdditionalPropertiesArray - //Assert.IsInstanceOfType (instance, "variable 'instance' is a AdditionalPropertiesArray"); + // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesArray + //Assert.IsInstanceOf(typeof(AdditionalPropertiesArray), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs index 3180b1237a84..c09b604fae8e 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void AdditionalPropertiesBooleanInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" AdditionalPropertiesBoolean - //Assert.IsInstanceOfType (instance, "variable 'instance' is a AdditionalPropertiesBoolean"); + // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesBoolean + //Assert.IsInstanceOf(typeof(AdditionalPropertiesBoolean), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs index 9ed6376a5b32..4ee461b5ed0d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void AdditionalPropertiesClassInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" AdditionalPropertiesClass - //Assert.IsInstanceOfType (instance, "variable 'instance' is a AdditionalPropertiesClass"); + // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesClass + //Assert.IsInstanceOf(typeof(AdditionalPropertiesClass), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs index 7bdcee4b637e..98e65b0e5486 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void AdditionalPropertiesIntegerInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" AdditionalPropertiesInteger - //Assert.IsInstanceOfType (instance, "variable 'instance' is a AdditionalPropertiesInteger"); + // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesInteger + //Assert.IsInstanceOf(typeof(AdditionalPropertiesInteger), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs index 61d2c0389f47..b20dac9314a0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void AdditionalPropertiesNumberInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" AdditionalPropertiesNumber - //Assert.IsInstanceOfType (instance, "variable 'instance' is a AdditionalPropertiesNumber"); + // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesNumber + //Assert.IsInstanceOf(typeof(AdditionalPropertiesNumber), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs index 502718f42cb0..342cbd470754 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void AdditionalPropertiesObjectInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" AdditionalPropertiesObject - //Assert.IsInstanceOfType (instance, "variable 'instance' is a AdditionalPropertiesObject"); + // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesObject + //Assert.IsInstanceOf(typeof(AdditionalPropertiesObject), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs index 2e5414c37306..273ade918d84 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void AdditionalPropertiesStringInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" AdditionalPropertiesString - //Assert.IsInstanceOfType (instance, "variable 'instance' is a AdditionalPropertiesString"); + // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesString + //Assert.IsInstanceOf(typeof(AdditionalPropertiesString), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs index 108e4e1557de..f404924f4598 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void AnimalInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Animal - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Animal"); + // TODO uncomment below to test "IsInstanceOf" Animal + //Assert.IsInstanceOf(typeof(Animal), instance); } /// @@ -71,7 +71,7 @@ public void AnimalInstanceTest() public void DogDeserializeFromAnimalTest() { // TODO uncomment below to test deserialize a Dog from type Animal - //Assert.IsInstanceOf(JsonConvert.DeserializeObject(new Dog().ToJson())); + //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Dog().ToJson())); } /// /// Test deserialize a Cat from type Animal @@ -80,7 +80,16 @@ public void DogDeserializeFromAnimalTest() public void CatDeserializeFromAnimalTest() { // TODO uncomment below to test deserialize a Cat from type Animal - //Assert.IsInstanceOf(JsonConvert.DeserializeObject(new Cat().ToJson())); + //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Cat().ToJson())); + } + /// + /// Test deserialize a BigCat from type Cat + /// + [Test] + public void BigCatDeserializeFromCatTest() + { + // TODO uncomment below to test deserialize a BigCat from type Cat + //Assert.IsInstanceOf(typeof(Cat), JsonConvert.DeserializeObject(new BigCat().ToJson())); } /// diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs index 2640f864df68..2442b4ef55d8 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void ApiResponseInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" ApiResponse - //Assert.IsInstanceOfType (instance, "variable 'instance' is a ApiResponse"); + // TODO uncomment below to test "IsInstanceOf" ApiResponse + //Assert.IsInstanceOf(typeof(ApiResponse), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs index ba3ff03b3c58..094432c33615 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void ArrayOfArrayOfNumberOnlyInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" ArrayOfArrayOfNumberOnly - //Assert.IsInstanceOfType (instance, "variable 'instance' is a ArrayOfArrayOfNumberOnly"); + // TODO uncomment below to test "IsInstanceOf" ArrayOfArrayOfNumberOnly + //Assert.IsInstanceOf(typeof(ArrayOfArrayOfNumberOnly), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs index 55f896463a03..d95bf3883d95 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void ArrayOfNumberOnlyInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" ArrayOfNumberOnly - //Assert.IsInstanceOfType (instance, "variable 'instance' is a ArrayOfNumberOnly"); + // TODO uncomment below to test "IsInstanceOf" ArrayOfNumberOnly + //Assert.IsInstanceOf(typeof(ArrayOfNumberOnly), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs index 80fd020890f0..af09220da3ce 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void ArrayTestInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" ArrayTest - //Assert.IsInstanceOfType (instance, "variable 'instance' is a ArrayTest"); + // TODO uncomment below to test "IsInstanceOf" ArrayTest + //Assert.IsInstanceOf(typeof(ArrayTest), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs index 6e2b957083ac..dd2156d3ba85 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void CapitalizationInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Capitalization - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Capitalization"); + // TODO uncomment below to test "IsInstanceOf" Capitalization + //Assert.IsInstanceOf(typeof(Capitalization), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs index 2fbe160ad5cf..d7afe6310fa7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class CatAllOfTests { // TODO uncomment below to declare an instance variable for CatAllOf @@ -61,8 +60,8 @@ public void Cleanup() [Test] public void CatAllOfInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" CatAllOf - //Assert.IsInstanceOfType (instance, "variable 'instance' is a CatAllOf"); + // TODO uncomment below to test "IsInstanceOf" CatAllOf + //Assert.IsInstanceOf(typeof(CatAllOf), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs index 02b9f47b82bf..8b89be0ec8d1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void CatInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Cat - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Cat"); + // TODO uncomment below to test "IsInstanceOf" Cat + //Assert.IsInstanceOf(typeof(Cat), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs index 6b5ddc1906be..e65b9ab1c016 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void CategoryInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Category - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Category"); + // TODO uncomment below to test "IsInstanceOf" Category + //Assert.IsInstanceOf(typeof(Category), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs index f64883e9ff32..6302a4d8dd90 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void ClassModelInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" ClassModel - //Assert.IsInstanceOfType (instance, "variable 'instance' is a ClassModel"); + // TODO uncomment below to test "IsInstanceOf" ClassModel + //Assert.IsInstanceOf(typeof(ClassModel), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs index 52fa1021fc5c..30f5bed38e19 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class DogAllOfTests { // TODO uncomment below to declare an instance variable for DogAllOf @@ -61,8 +60,8 @@ public void Cleanup() [Test] public void DogAllOfInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" DogAllOf - //Assert.IsInstanceOfType (instance, "variable 'instance' is a DogAllOf"); + // TODO uncomment below to test "IsInstanceOf" DogAllOf + //Assert.IsInstanceOf(typeof(DogAllOf), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs index 083be397f77b..fba682a3f9e5 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void DogInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Dog - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Dog"); + // TODO uncomment below to test "IsInstanceOf" Dog + //Assert.IsInstanceOf(typeof(Dog), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs index 8ae6a179e776..065ae99b6139 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void EnumArraysInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" EnumArrays - //Assert.IsInstanceOfType (instance, "variable 'instance' is a EnumArrays"); + // TODO uncomment below to test "IsInstanceOf" EnumArrays + //Assert.IsInstanceOf(typeof(EnumArrays), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs index 10ae874e846e..2ff4f5ab8b0e 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void EnumClassInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" EnumClass - //Assert.IsInstanceOfType (instance, "variable 'instance' is a EnumClass"); + // TODO uncomment below to test "IsInstanceOf" EnumClass + //Assert.IsInstanceOf(typeof(EnumClass), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs index bd96d5636d12..0ea4d901d50b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void EnumTestInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" EnumTest - //Assert.IsInstanceOfType (instance, "variable 'instance' is a EnumTest"); + // TODO uncomment below to test "IsInstanceOf" EnumTest + //Assert.IsInstanceOf(typeof(EnumTest), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs index e1ad9a0c243f..02ae51ce37ee 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void FileSchemaTestClassInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" FileSchemaTestClass - //Assert.IsInstanceOfType (instance, "variable 'instance' is a FileSchemaTestClass"); + // TODO uncomment below to test "IsInstanceOf" FileSchemaTestClass + //Assert.IsInstanceOf(typeof(FileSchemaTestClass), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs index acaf56152c6e..b18213afe493 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void FileInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" File - //Assert.IsInstanceOfType (instance, "variable 'instance' is a File"); + // TODO uncomment below to test "IsInstanceOf" File + //Assert.IsInstanceOf(typeof(File), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 2c7ce557ca17..d5b7b0ba8851 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void FormatTestInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" FormatTest - //Assert.IsInstanceOfType (instance, "variable 'instance' is a FormatTest"); + // TODO uncomment below to test "IsInstanceOf" FormatTest + //Assert.IsInstanceOf(typeof(FormatTest), instance); } @@ -169,6 +169,14 @@ public void PasswordTest() { // TODO unit test for the property 'Password' } + /// + /// Test the property 'BigDecimal' + /// + [Test] + public void BigDecimalTest() + { + // TODO unit test for the property 'BigDecimal' + } } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs index 4669408d8865..0c1ec60ef463 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void HasOnlyReadOnlyInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" HasOnlyReadOnly - //Assert.IsInstanceOfType (instance, "variable 'instance' is a HasOnlyReadOnly"); + // TODO uncomment below to test "IsInstanceOf" HasOnlyReadOnly + //Assert.IsInstanceOf(typeof(HasOnlyReadOnly), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs index 8fd5456835ca..57f55da25ed3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void ListInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" List - //Assert.IsInstanceOfType (instance, "variable 'instance' is a List"); + // TODO uncomment below to test "IsInstanceOf" List + //Assert.IsInstanceOf(typeof(List), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs index 508dc3c13813..53220cdd78a6 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void MapTestInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" MapTest - //Assert.IsInstanceOfType (instance, "variable 'instance' is a MapTest"); + // TODO uncomment below to test "IsInstanceOf" MapTest + //Assert.IsInstanceOf(typeof(MapTest), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs index 9d963599991c..792db793c52d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" MixedPropertiesAndAdditionalPropertiesClass - //Assert.IsInstanceOfType (instance, "variable 'instance' is a MixedPropertiesAndAdditionalPropertiesClass"); + // TODO uncomment below to test "IsInstanceOf" MixedPropertiesAndAdditionalPropertiesClass + //Assert.IsInstanceOf(typeof(MixedPropertiesAndAdditionalPropertiesClass), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs index 701423909c03..68ed58223dee 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void Model200ResponseInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Model200Response - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Model200Response"); + // TODO uncomment below to test "IsInstanceOf" Model200Response + //Assert.IsInstanceOf(typeof(Model200Response), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs index 4da1fdf73e51..0313c8fd1a63 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void ModelClientInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" ModelClient - //Assert.IsInstanceOfType (instance, "variable 'instance' is a ModelClient"); + // TODO uncomment below to test "IsInstanceOf" ModelClient + //Assert.IsInstanceOf(typeof(ModelClient), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs index d7f80082aee8..eb5fb91b0f56 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void NameInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Name - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Name"); + // TODO uncomment below to test "IsInstanceOf" Name + //Assert.IsInstanceOf(typeof(Name), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs index 48428b86b352..5f90f85f79c8 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void NumberOnlyInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" NumberOnly - //Assert.IsInstanceOfType (instance, "variable 'instance' is a NumberOnly"); + // TODO uncomment below to test "IsInstanceOf" NumberOnly + //Assert.IsInstanceOf(typeof(NumberOnly), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs index add9d154fb39..7d155bb54cdb 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void OrderInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Order - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Order"); + // TODO uncomment below to test "IsInstanceOf" Order + //Assert.IsInstanceOf(typeof(Order), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs index bcfdd4516cbd..6dd51d6f49e1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void OuterCompositeInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" OuterComposite - //Assert.IsInstanceOfType (instance, "variable 'instance' is a OuterComposite"); + // TODO uncomment below to test "IsInstanceOf" OuterComposite + //Assert.IsInstanceOf(typeof(OuterComposite), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs index bd71a2ed183e..eb7688835a06 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void OuterEnumInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" OuterEnum - //Assert.IsInstanceOfType (instance, "variable 'instance' is a OuterEnum"); + // TODO uncomment below to test "IsInstanceOf" OuterEnum + //Assert.IsInstanceOf(typeof(OuterEnum), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs index 7507d9f74e3b..37f2c09d2d34 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -32,9 +32,8 @@ namespace Org.OpenAPITools.Test /// public class PetTests { - private Pet instance; - - private long petId = 11088; + // TODO uncomment below to declare an instance variable for Pet + //private Pet instance; /// /// Setup before each test @@ -42,7 +41,8 @@ public class PetTests [SetUp] public void Init() { - instance = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); + // TODO uncomment below to create an instance of Pet + //instance = new Pet(); } /// @@ -60,7 +60,8 @@ public void Cleanup() [Test] public void PetInstanceTest() { - Assert.IsInstanceOf(typeof(Pet), instance); + // TODO uncomment below to test "IsInstanceOf" Pet + //Assert.IsInstanceOf(typeof(Pet), instance); } @@ -113,80 +114,6 @@ public void StatusTest() // TODO unit test for the property 'Status' } - /// - /// Test serialization - /// - [Test()] - public void TestSerialization() - { - // create pet - Pet p1 = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); - Assert.AreEqual("{\"name\":\"Csharp test\",\"photoUrls\":[\"http://petstore.com/csharp_test\"]}", JsonConvert.SerializeObject(p1)); - } - - /// - /// Test Equal - /// - [Test()] - public void TestEqual() - { - // create pet - Pet p1 = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); - p1.Id = petId; - //p1.Name = "Csharp test"; - p1.Status = Pet.StatusEnum.Available; - // create Category object - Category category1 = new Category(); - category1.Id = 56; - category1.Name = "sample category name2"; - List photoUrls1 = new List(new String[] { "sample photoUrls" }); - // create Tag object - Tag tag1 = new Tag(); - tag1.Id = petId; - tag1.Name = "csharp sample tag name1"; - List tags1 = new List(new Tag[] { tag1 }); - p1.Tags = tags1; - p1.Category = category1; - p1.PhotoUrls = photoUrls1; - - // create pet 2 - Pet p2 = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); - p2.Id = petId; - p2.Name = "Csharp test"; - p2.Status = Pet.StatusEnum.Available; - // create Category object - Category category2 = new Category(); - category2.Id = 56; - category2.Name = "sample category name2"; - List photoUrls2 = new List(new String[] { "sample photoUrls" }); - // create Tag object - Tag tag2 = new Tag(); - tag2.Id = petId; - tag2.Name = "csharp sample tag name1"; - List tags2 = new List(new Tag[] { tag2 }); - p2.Tags = tags2; - p2.Category = category2; - p2.PhotoUrls = photoUrls2; - - // p1 and p2 should be equal (both object and attribute level) - Assert.IsTrue(category1.Equals(category2)); - Assert.IsTrue(tags1.SequenceEqual(tags2)); - Assert.IsTrue(p1.PhotoUrls.SequenceEqual(p2.PhotoUrls)); - - Assert.IsTrue(p1.Equals(p2)); - - // update attribute to that p1 and p2 are not equal - category2.Name = "new category name"; - Assert.IsFalse(category1.Equals(category2)); - - tags2 = new List(); - Assert.IsFalse(tags1.SequenceEqual(tags2)); - - // photoUrls has not changed so it should be equal - Assert.IsTrue(p1.PhotoUrls.SequenceEqual(p2.PhotoUrls)); - - Assert.IsFalse(p1.Equals(p2)); - } - } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs index c2823e5ca499..c870caf786c3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void ReadOnlyFirstInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" ReadOnlyFirst - //Assert.IsInstanceOfType (instance, "variable 'instance' is a ReadOnlyFirst"); + // TODO uncomment below to test "IsInstanceOf" ReadOnlyFirst + //Assert.IsInstanceOf(typeof(ReadOnlyFirst), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index 176d55e5fe45..e744ff4f7115 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void ReturnInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Return - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Return"); + // TODO uncomment below to test "IsInstanceOf" Return + //Assert.IsInstanceOf(typeof(Return), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs index 0902a6d961c0..274d9db265d5 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void SpecialModelNameInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" SpecialModelName - //Assert.IsInstanceOfType (instance, "variable 'instance' is a SpecialModelName"); + // TODO uncomment below to test "IsInstanceOf" SpecialModelName + //Assert.IsInstanceOf(typeof(SpecialModelName), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs index b4927515fe1f..22c9058e65d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void TagInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" Tag - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Tag"); + // TODO uncomment below to test "IsInstanceOf" Tag + //Assert.IsInstanceOf(typeof(Tag), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs index 476af27f1f30..18c3dc5d60e3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void TypeHolderDefaultInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" TypeHolderDefault - //Assert.IsInstanceOfType (instance, "variable 'instance' is a TypeHolderDefault"); + // TODO uncomment below to test "IsInstanceOf" TypeHolderDefault + //Assert.IsInstanceOf(typeof(TypeHolderDefault), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs index cf220d7d6ff9..b1e637843463 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void TypeHolderExampleInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" TypeHolderExample - //Assert.IsInstanceOfType (instance, "variable 'instance' is a TypeHolderExample"); + // TODO uncomment below to test "IsInstanceOf" TypeHolderExample + //Assert.IsInstanceOf(typeof(TypeHolderExample), instance); } @@ -82,6 +82,14 @@ public void NumberItemTest() // TODO unit test for the property 'NumberItem' } /// + /// Test the property 'FloatItem' + /// + [Test] + public void FloatItemTest() + { + // TODO unit test for the property 'FloatItem' + } + /// /// Test the property 'IntegerItem' /// [Test] diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs index 506ddc1ddc64..0f37935e9a20 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void UserInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" User - //Assert.IsInstanceOfType (instance, "variable 'instance' is a User"); + // TODO uncomment below to test "IsInstanceOf" User + //Assert.IsInstanceOf(typeof(User), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs index d1646dc97d04..5ab42bab1c65 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs @@ -3,7 +3,7 @@ * * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -60,8 +60,8 @@ public void Cleanup() [Test] public void XmlItemInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" XmlItem - //Assert.IsInstanceOfType (instance, "variable 'instance' is a XmlItem"); + // TODO uncomment below to test "IsInstanceOf" XmlItem + //Assert.IsInstanceOf(typeof(XmlItem), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index c7a19d07a9fc..4b8e53975129 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 --> @@ -47,16 +47,16 @@ OpenAPI spec version: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll @@ -72,7 +72,8 @@ OpenAPI spec version: 1.0.0 - + @@ -84,8 +85,5 @@ OpenAPI spec version: 1.0.0 Org.OpenAPITools - - - diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config index 3a76058ad5ec..a3a1bab35101 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config @@ -1,7 +1,7 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs index 4aab6d025064..9ccb39dfeedd 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -134,7 +134,7 @@ private RestRequest PrepareRequest( // add file parameter, if any foreach(var param in fileParams) { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); } if (postBody != null) // http body (model or byte[]) parameter diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj index d1ee278c648a..6c69e3745f60 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -62,10 +62,10 @@ The version of the OpenAPI document: 1.0.0 ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - $(SolutionDir)\packages\RestSharp.106.10.1\lib\net45\RestSharp.dll - ..\packages\RestSharp.106.10.1\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.106.10.1\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.106.10.1\lib\net45\RestSharp.dll + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index 52f47b1cfa48..c9ccbe1a8242 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -25,8 +25,8 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config index 3c51d62cc990..a3a1bab35101 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config @@ -1,6 +1,7 @@ - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION index 9aadf8cf6576..b5d898602c2c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT +4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat b/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat index 3910f59e9880..2f83a5a8d187 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat @@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net35\RestSharp.dll bin\RestSharp.dll %CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh index d0a31cd3c55e..979703be7f03 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh @@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.12.0.1/lib/net35/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net35/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.5.2/lib/net35/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/JsonSubTypes.1.6.0/lib/net35/JsonSubTypes.dll bin/JsonSubTypes.dll echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 155563e5570d..b756329e87f4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -47,16 +47,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll @@ -65,10 +65,10 @@ The version of the OpenAPI document: 1.0.0 ..\..\vendor\RestSharp.105.1.0\lib\net35\RestSharp.dll - $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.11.0\lib\net35\nunit.framework.dll + ..\packages\NUnit.3.11.0\lib\net35\nunit.framework.dll + ..\..\packages\NUnit.3.11.0\lib\net35\nunit.framework.dll + ..\..\vendor\NUnit.3.11.0\lib\net35\nunit.framework.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config index 2d641db67985..fb89a7e36fb9 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config @@ -1,7 +1,7 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs index d9b2b1b82b35..8c65f55887b8 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs @@ -134,7 +134,7 @@ private RestRequest PrepareRequest( // add file parameter, if any foreach(var param in fileParams) { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); } if (postBody != null) // http body (model or byte[]) parameter diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 9105a6952350..c114f159dbac 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -62,10 +62,10 @@ The version of the OpenAPI document: 1.0.0 ..\..\vendor\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll - $(SolutionDir)\packages\RestSharp.106.10.1\lib\net35\RestSharp.dll - ..\packages\RestSharp.106.10.1\lib\net35\RestSharp.dll - ..\..\packages\RestSharp.106.10.1\lib\net35\RestSharp.dll - ..\..\vendor\RestSharp.106.10.1\lib\net35\RestSharp.dll + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net35\RestSharp.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index 52f47b1cfa48..c9ccbe1a8242 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -25,8 +25,8 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config index 822d1d39be01..fb89a7e36fb9 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config @@ -1,6 +1,7 @@ - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION index 9aadf8cf6576..b5d898602c2c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT +4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat b/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat index 0bf67cfa4a7a..f14ee2197655 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat @@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net4\RestSharp.dll bin\RestSharp.dll %CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh index 791a3a16b604..25d8bff1a0b6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh @@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.12.0.1/lib/net40/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net4/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.5.2/lib/net40/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/JsonSubTypes.1.6.0/lib/net40/JsonSubTypes.dll bin/JsonSubTypes.dll echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index e40d730a8077..41afd0c9247d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -47,16 +47,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll @@ -65,10 +65,10 @@ The version of the OpenAPI document: 1.0.0 ..\..\vendor\RestSharp.105.1.0\lib\net4\RestSharp.dll - $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.11.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.11.0\lib\net40\nunit.framework.dll + ..\..\packages\NUnit.3.11.0\lib\net40\nunit.framework.dll + ..\..\vendor\NUnit.3.11.0\lib\net40\nunit.framework.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config index db743146a39e..d608f2758ce2 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config @@ -1,7 +1,7 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs index d9b2b1b82b35..8c65f55887b8 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs @@ -134,7 +134,7 @@ private RestRequest PrepareRequest( // add file parameter, if any foreach(var param in fileParams) { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); } if (postBody != null) // http body (model or byte[]) parameter diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 2154c91e7891..43725ffa4dd6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -62,10 +62,10 @@ The version of the OpenAPI document: 1.0.0 ..\..\vendor\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll - $(SolutionDir)\packages\RestSharp.106.10.1\lib\net4\RestSharp.dll - ..\packages\RestSharp.106.10.1\lib\net4\RestSharp.dll - ..\..\packages\RestSharp.106.10.1\lib\net4\RestSharp.dll - ..\..\vendor\RestSharp.106.10.1\lib\net4\RestSharp.dll + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net4\RestSharp.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index 52f47b1cfa48..c9ccbe1a8242 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -25,8 +25,8 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config index 40ed71324930..d608f2758ce2 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config @@ -1,6 +1,7 @@ - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs index 4b8e41dc2a13..83f3b0a7b66d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs @@ -505,6 +505,7 @@ public static string SanitizeFilename(string filename) /// Convert params to key/value pairs. /// Use collectionFormat to properly format lists and collections. /// + /// Collection format. /// Key name. /// Value object. /// A list of KeyValuePairs diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 36c1caacecfa..83b4ee272ad7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -20,9 +20,9 @@ - - + + - \ No newline at end of file + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION index 9aadf8cf6576..b5d898602c2c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT +4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln index 4f3b7e0fdef6..8d85f5b71f0b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{3AB1F259-1769-484B-9411-84505FCCBD55}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -10,10 +10,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3AB1F259-1769-484B-9411-84505FCCBD55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3AB1F259-1769-484B-9411-84505FCCBD55}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3AB1F259-1769-484B-9411-84505FCCBD55}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3AB1F259-1769-484B-9411-84505FCCBD55}.Release|Any CPU.Build.0 = Release|Any CPU + {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.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/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 0b8a73d6143f..7c827a81c332 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -12,7 +12,7 @@ The version of the OpenAPI document: 1.0.0 14.0 Debug AnyCPU - {3AB1F259-1769-484B-9411-84505FCCBD55} + {321C8C3F-0156-40C1-AE42-D59761FB9B6C} Library Properties Org.OpenAPITools diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION index 9aadf8cf6576..b5d898602c2c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT +4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat index 6cfcc5b213e1..935e87072cb8 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat @@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll copy packages\Fody.1.29.4\Fody.dll bin\Fody.dll copy packages\PropertyChanged.Fody.1.51.3\PropertyChanged.Fody.dll bin\PropertyChanged.Fody.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh index 7a5668e35c59..f178f97386aa 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh @@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.12.0.1/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.5.2/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/JsonSubTypes.1.6.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll cp packages/Fody.1.29.4/Fody.dll bin/Fody.dll cp packages/PropertyChanged.Fody.1.51.3/PropertyChanged.Fody.dll bin/PropertyChanged.Fody.dll cp packages/PropertyChanged.Fody.1.51.3/Lib/dotnet/PropertyChanged.dll bin/PropertyChanged.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index e923e5727b31..ec874a21566b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -47,16 +47,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config index 3a76058ad5ec..a3a1bab35101 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config @@ -1,7 +1,7 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs index 4aab6d025064..9ccb39dfeedd 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs @@ -134,7 +134,7 @@ private RestRequest PrepareRequest( // add file parameter, if any foreach(var param in fileParams) { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); } if (postBody != null) // http body (model or byte[]) parameter diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 4d0ec42a049b..6b2e4484c928 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -62,10 +62,10 @@ The version of the OpenAPI document: 1.0.0 ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - $(SolutionDir)\packages\RestSharp.106.10.1\lib\net45\RestSharp.dll - ..\packages\RestSharp.106.10.1\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.106.10.1\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.106.10.1\lib\net45\RestSharp.dll + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll ..\..\packages\PropertyChanged.Fody.1.51.3\Lib\portable-net4+sl4+wp8+win8+wpa81+MonoAndroid16+MonoTouch40\PropertyChanged.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index 14b8f8c34b44..49a1278cf4dd 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -25,8 +25,8 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config index 949bc498bf4a..ae907440b135 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config @@ -1,6 +1,7 @@ - + +