From a5cf2fac8f8122cfbc26e662e4eb82cb56c5c952 Mon Sep 17 00:00:00 2001 From: devhl Date: Sat, 28 Jan 2023 23:17:48 -0500 Subject: [PATCH] build all samples --- .../.openapi-generator/FILES | 3 + .../README.md | 1 + .../docs/NullableGuidClass.md | 10 ++ .../Model/NullableGuidClassTests.cs | 70 ++++++++ .../Model/NullableGuidClass.cs | 154 ++++++++++++++++++ .../docs/NullableGuidClass.md | 10 ++ .../Model/NullableGuidClassTests.cs | 70 ++++++++ .../Model/NullableGuidClass.cs | 133 +++++++++++++++ .../docs/NullableGuidClass.md | 10 ++ .../Model/NullableGuidClassTests.cs | 70 ++++++++ .../Model/NullableGuidClass.cs | 132 +++++++++++++++ .../docs/NullableGuidClass.md | 10 ++ .../Model/NullableGuidClassTests.cs | 70 ++++++++ .../Model/NullableGuidClass.cs | 132 +++++++++++++++ .../docs/NullableGuidClass.md | 10 ++ .../Model/NullableGuidClassTests.cs | 70 ++++++++ .../Model/NullableGuidClass.cs | 132 +++++++++++++++ .../OpenAPIClient/.openapi-generator/FILES | 3 + .../csharp-netcore/OpenAPIClient/README.md | 1 + .../OpenAPIClient/docs/NullableGuidClass.md | 10 ++ .../Model/NullableGuidClassTests.cs | 70 ++++++++ .../Model/NullableGuidClass.cs | 132 +++++++++++++++ .../.openapi-generator/FILES | 3 + .../OpenAPIClientCore/README.md | 1 + .../docs/NullableGuidClass.md | 10 ++ .../Model/NullableGuidClassTests.cs | 70 ++++++++ .../Model/NullableGuidClass.cs | 120 ++++++++++++++ 27 files changed, 1507 insertions(+) create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/NullableGuidClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/NullableGuidClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/NullableGuidClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/NullableGuidClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/NullableGuidClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/NullableGuidClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/NullableGuidClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableGuidClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableGuidClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient/docs/NullableGuidClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NullableGuidClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/NullableGuidClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/NullableGuidClass.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES index 917a723fcc6..826ddffd165 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES @@ -56,6 +56,7 @@ docs/Model200Response.md docs/ModelClient.md docs/Name.md docs/NullableClass.md +docs/NullableGuidClass.md docs/NullableShape.md docs/NumberOnly.md docs/ObjectWithDeprecatedFields.md @@ -89,6 +90,7 @@ docs/UserApi.md docs/Whale.md docs/Zebra.md git_push.sh +src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj src/Org.OpenAPITools/Api/AnotherFakeApi.cs src/Org.OpenAPITools/Api/DefaultApi.cs @@ -168,6 +170,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs src/Org.OpenAPITools/Model/ModelClient.cs src/Org.OpenAPITools/Model/Name.cs src/Org.OpenAPITools/Model/NullableClass.cs +src/Org.OpenAPITools/Model/NullableGuidClass.cs src/Org.OpenAPITools/Model/NullableShape.cs src/Org.OpenAPITools/Model/NumberOnly.cs src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md index 04880651478..8b52ad6dfe0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md @@ -197,6 +197,7 @@ Class | Method | HTTP request | Description - [Model.ModelClient](docs/ModelClient.md) - [Model.Name](docs/Name.md) - [Model.NullableClass](docs/NullableClass.md) + - [Model.NullableGuidClass](docs/NullableGuidClass.md) - [Model.NullableShape](docs/NullableShape.md) - [Model.NumberOnly](docs/NumberOnly.md) - [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/NullableGuidClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/NullableGuidClass.md new file mode 100644 index 00000000000..5ada17b4db8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/NullableGuidClass.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.NullableGuidClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **Guid?** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs new file mode 100644 index 00000000000..0bc0ea36918 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs @@ -0,0 +1,70 @@ +/* + * 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 Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NullableGuidClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NullableGuidClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NullableGuidClass + //private NullableGuidClass instance; + + public NullableGuidClassTests() + { + // TODO uncomment below to create an instance of NullableGuidClass + //instance = new NullableGuidClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NullableGuidClass + /// + [Fact] + public void NullableGuidClassInstanceTest() + { + // TODO uncomment below to test "IsType" NullableGuidClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs new file mode 100644 index 00000000000..a0b744f5a67 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -0,0 +1,154 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// NullableGuidClass + /// + [DataContract(Name = "NullableGuidClass")] + public partial class NullableGuidClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// uuid. + public NullableGuidClass(Guid? uuid = default(Guid?)) + { + this._Uuid = uuid; + if (this.Uuid != null) + { + this._flagUuid = true; + } + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name = "uuid", EmitDefaultValue = true)] + public Guid? Uuid + { + get{ return _Uuid;} + set + { + _Uuid = value; + _flagUuid = true; + } + } + private Guid? _Uuid; + private bool _flagUuid; + + /// + /// Returns false as Uuid should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeUuid() + { + return _flagUuid; + } + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NullableGuidClass {\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual; + } + + /// + /// Returns true if NullableGuidClass instances are equal + /// + /// Instance of NullableGuidClass to be compared + /// Boolean + public bool Equals(NullableGuidClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Uuid != null) + { + hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/NullableGuidClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/NullableGuidClass.md new file mode 100644 index 00000000000..5ada17b4db8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/NullableGuidClass.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.NullableGuidClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **Guid?** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs new file mode 100644 index 00000000000..0bc0ea36918 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs @@ -0,0 +1,70 @@ +/* + * 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 Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NullableGuidClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NullableGuidClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NullableGuidClass + //private NullableGuidClass instance; + + public NullableGuidClassTests() + { + // TODO uncomment below to create an instance of NullableGuidClass + //instance = new NullableGuidClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NullableGuidClass + /// + [Fact] + public void NullableGuidClassInstanceTest() + { + // TODO uncomment below to test "IsType" NullableGuidClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/NullableGuidClass.cs new file mode 100644 index 00000000000..b3f48fcc200 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -0,0 +1,133 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Org.OpenAPITools.Client.FileParameter; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// NullableGuidClass + /// + [DataContract(Name = "NullableGuidClass")] + public partial class NullableGuidClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// uuid. + public NullableGuidClass(Guid? uuid = default(Guid?)) + { + this.Uuid = uuid; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name = "uuid", EmitDefaultValue = true)] + public Guid? Uuid { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NullableGuidClass {\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual; + } + + /// + /// Returns true if NullableGuidClass instances are equal + /// + /// Instance of NullableGuidClass to be compared + /// Boolean + public bool Equals(NullableGuidClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Uuid != null) + { + hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/NullableGuidClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/NullableGuidClass.md new file mode 100644 index 00000000000..5ada17b4db8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/NullableGuidClass.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.NullableGuidClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **Guid?** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs new file mode 100644 index 00000000000..0bc0ea36918 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs @@ -0,0 +1,70 @@ +/* + * 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 Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NullableGuidClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NullableGuidClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NullableGuidClass + //private NullableGuidClass instance; + + public NullableGuidClassTests() + { + // TODO uncomment below to create an instance of NullableGuidClass + //instance = new NullableGuidClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NullableGuidClass + /// + [Fact] + public void NullableGuidClassInstanceTest() + { + // TODO uncomment below to test "IsType" NullableGuidClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/NullableGuidClass.cs new file mode 100644 index 00000000000..9184756cb73 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -0,0 +1,132 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// NullableGuidClass + /// + [DataContract(Name = "NullableGuidClass")] + public partial class NullableGuidClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// uuid. + public NullableGuidClass(Guid? uuid = default(Guid?)) + { + this.Uuid = uuid; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name = "uuid", EmitDefaultValue = true)] + public Guid? Uuid { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NullableGuidClass {\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual; + } + + /// + /// Returns true if NullableGuidClass instances are equal + /// + /// Instance of NullableGuidClass to be compared + /// Boolean + public bool Equals(NullableGuidClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Uuid != null) + { + hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/NullableGuidClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/NullableGuidClass.md new file mode 100644 index 00000000000..5ada17b4db8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/NullableGuidClass.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.NullableGuidClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **Guid?** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs new file mode 100644 index 00000000000..0bc0ea36918 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs @@ -0,0 +1,70 @@ +/* + * 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 Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NullableGuidClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NullableGuidClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NullableGuidClass + //private NullableGuidClass instance; + + public NullableGuidClassTests() + { + // TODO uncomment below to create an instance of NullableGuidClass + //instance = new NullableGuidClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NullableGuidClass + /// + [Fact] + public void NullableGuidClassInstanceTest() + { + // TODO uncomment below to test "IsType" NullableGuidClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/NullableGuidClass.cs new file mode 100644 index 00000000000..9184756cb73 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -0,0 +1,132 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// NullableGuidClass + /// + [DataContract(Name = "NullableGuidClass")] + public partial class NullableGuidClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// uuid. + public NullableGuidClass(Guid? uuid = default(Guid?)) + { + this.Uuid = uuid; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name = "uuid", EmitDefaultValue = true)] + public Guid? Uuid { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NullableGuidClass {\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual; + } + + /// + /// Returns true if NullableGuidClass instances are equal + /// + /// Instance of NullableGuidClass to be compared + /// Boolean + public bool Equals(NullableGuidClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Uuid != null) + { + hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableGuidClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableGuidClass.md new file mode 100644 index 00000000000..5ada17b4db8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableGuidClass.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.NullableGuidClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **Guid?** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs new file mode 100644 index 00000000000..0bc0ea36918 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs @@ -0,0 +1,70 @@ +/* + * 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 Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NullableGuidClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NullableGuidClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NullableGuidClass + //private NullableGuidClass instance; + + public NullableGuidClassTests() + { + // TODO uncomment below to create an instance of NullableGuidClass + //instance = new NullableGuidClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NullableGuidClass + /// + [Fact] + public void NullableGuidClassInstanceTest() + { + // TODO uncomment below to test "IsType" NullableGuidClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableGuidClass.cs new file mode 100644 index 00000000000..9184756cb73 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -0,0 +1,132 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// NullableGuidClass + /// + [DataContract(Name = "NullableGuidClass")] + public partial class NullableGuidClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// uuid. + public NullableGuidClass(Guid? uuid = default(Guid?)) + { + this.Uuid = uuid; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name = "uuid", EmitDefaultValue = true)] + public Guid? Uuid { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NullableGuidClass {\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual; + } + + /// + /// Returns true if NullableGuidClass instances are equal + /// + /// Instance of NullableGuidClass to be compared + /// Boolean + public bool Equals(NullableGuidClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Uuid != null) + { + hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES index 59f6d50ea71..458afcc01db 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES @@ -56,6 +56,7 @@ docs/Model200Response.md docs/ModelClient.md docs/Name.md docs/NullableClass.md +docs/NullableGuidClass.md docs/NullableShape.md docs/NumberOnly.md docs/ObjectWithDeprecatedFields.md @@ -89,6 +90,7 @@ docs/UserApi.md docs/Whale.md docs/Zebra.md git_push.sh +src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs src/Org.OpenAPITools/Api/AnotherFakeApi.cs src/Org.OpenAPITools/Api/DefaultApi.cs src/Org.OpenAPITools/Api/FakeApi.cs @@ -167,6 +169,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs src/Org.OpenAPITools/Model/ModelClient.cs src/Org.OpenAPITools/Model/Name.cs src/Org.OpenAPITools/Model/NullableClass.cs +src/Org.OpenAPITools/Model/NullableGuidClass.cs src/Org.OpenAPITools/Model/NullableShape.cs src/Org.OpenAPITools/Model/NumberOnly.cs src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md index 04880651478..8b52ad6dfe0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md @@ -197,6 +197,7 @@ Class | Method | HTTP request | Description - [Model.ModelClient](docs/ModelClient.md) - [Model.Name](docs/Name.md) - [Model.NullableClass](docs/NullableClass.md) + - [Model.NullableGuidClass](docs/NullableGuidClass.md) - [Model.NullableShape](docs/NullableShape.md) - [Model.NumberOnly](docs/NumberOnly.md) - [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/NullableGuidClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/NullableGuidClass.md new file mode 100644 index 00000000000..5ada17b4db8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/NullableGuidClass.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.NullableGuidClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **Guid?** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs new file mode 100644 index 00000000000..0bc0ea36918 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs @@ -0,0 +1,70 @@ +/* + * 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 Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NullableGuidClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NullableGuidClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NullableGuidClass + //private NullableGuidClass instance; + + public NullableGuidClassTests() + { + // TODO uncomment below to create an instance of NullableGuidClass + //instance = new NullableGuidClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NullableGuidClass + /// + [Fact] + public void NullableGuidClassInstanceTest() + { + // TODO uncomment below to test "IsType" NullableGuidClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NullableGuidClass.cs new file mode 100644 index 00000000000..9184756cb73 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -0,0 +1,132 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// NullableGuidClass + /// + [DataContract(Name = "NullableGuidClass")] + public partial class NullableGuidClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// uuid. + public NullableGuidClass(Guid? uuid = default(Guid?)) + { + this.Uuid = uuid; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name = "uuid", EmitDefaultValue = true)] + public Guid? Uuid { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NullableGuidClass {\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual; + } + + /// + /// Returns true if NullableGuidClass instances are equal + /// + /// Instance of NullableGuidClass to be compared + /// Boolean + public bool Equals(NullableGuidClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Uuid != null) + { + hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES index 59f6d50ea71..458afcc01db 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES @@ -56,6 +56,7 @@ docs/Model200Response.md docs/ModelClient.md docs/Name.md docs/NullableClass.md +docs/NullableGuidClass.md docs/NullableShape.md docs/NumberOnly.md docs/ObjectWithDeprecatedFields.md @@ -89,6 +90,7 @@ docs/UserApi.md docs/Whale.md docs/Zebra.md git_push.sh +src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs src/Org.OpenAPITools/Api/AnotherFakeApi.cs src/Org.OpenAPITools/Api/DefaultApi.cs src/Org.OpenAPITools/Api/FakeApi.cs @@ -167,6 +169,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs src/Org.OpenAPITools/Model/ModelClient.cs src/Org.OpenAPITools/Model/Name.cs src/Org.OpenAPITools/Model/NullableClass.cs +src/Org.OpenAPITools/Model/NullableGuidClass.cs src/Org.OpenAPITools/Model/NullableShape.cs src/Org.OpenAPITools/Model/NumberOnly.cs src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md index 8d0b00bf090..da89b947eba 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md @@ -209,6 +209,7 @@ Class | Method | HTTP request | Description - [Model.ModelClient](docs/ModelClient.md) - [Model.Name](docs/Name.md) - [Model.NullableClass](docs/NullableClass.md) + - [Model.NullableGuidClass](docs/NullableGuidClass.md) - [Model.NullableShape](docs/NullableShape.md) - [Model.NumberOnly](docs/NumberOnly.md) - [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/NullableGuidClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/NullableGuidClass.md new file mode 100644 index 00000000000..5ada17b4db8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/NullableGuidClass.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.NullableGuidClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **Guid?** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs new file mode 100644 index 00000000000..0bc0ea36918 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/NullableGuidClassTests.cs @@ -0,0 +1,70 @@ +/* + * 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 Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NullableGuidClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NullableGuidClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NullableGuidClass + //private NullableGuidClass instance; + + public NullableGuidClassTests() + { + // TODO uncomment below to create an instance of NullableGuidClass + //instance = new NullableGuidClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NullableGuidClass + /// + [Fact] + public void NullableGuidClassInstanceTest() + { + // TODO uncomment below to test "IsType" NullableGuidClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/NullableGuidClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/NullableGuidClass.cs new file mode 100644 index 00000000000..2c14b4eb0aa --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/NullableGuidClass.cs @@ -0,0 +1,120 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// NullableGuidClass + /// + [DataContract(Name = "NullableGuidClass")] + public partial class NullableGuidClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// uuid. + public NullableGuidClass(Guid? uuid = default(Guid?)) + { + this.Uuid = uuid; + } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name = "uuid", EmitDefaultValue = true)] + public Guid? Uuid { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NullableGuidClass {\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual; + } + + /// + /// Returns true if NullableGuidClass instances are equal + /// + /// Instance of NullableGuidClass to be compared + /// Boolean + public bool Equals(NullableGuidClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Uuid != null) + { + hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +}