diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 4281abea4fee..edc27c02f2cb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -521,6 +521,16 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co property.isMap = composedProperty.isMap; property.isContainer = composedProperty.isContainer; } + + // fix incorrect data types for maps of maps + if (property.datatypeWithEnum.contains("List>") && property.items != null) { + property.datatypeWithEnum = property.datatypeWithEnum.replace("List>", property.items.datatypeWithEnum + ">"); + property.dataType = property.datatypeWithEnum; + } + if (property.datatypeWithEnum.contains("Dictionary>") && property.items != null) { + property.datatypeWithEnum = property.datatypeWithEnum.replace("Dictionary>", property.items.datatypeWithEnum + ">"); + property.dataType = property.datatypeWithEnum; + } } @Override diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index b9e2888f551d..7695348b2088 100644 --- a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -2160,3 +2160,22 @@ components: StringArrayItem: type: string format: string + Activity: + description: "test map of maps" + type: object + properties: + activity_outputs: + type: object + additionalProperties: + $ref: '#/components/schemas/ActivityOutputRepresentation' + ActivityOutputRepresentation: + type: array + items: + $ref: '#/components/schemas/ActivityOutputElementRepresentation' + ActivityOutputElementRepresentation: + type: object + properties: + prop1: + type: string + prop2: + type: object 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 e99cb9be46cc..917a723fcc61 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES @@ -2,6 +2,8 @@ Org.OpenAPITools.sln README.md appveyor.yml +docs/Activity.md +docs/ActivityOutputElementRepresentation.md docs/AdditionalPropertiesClass.md docs/Animal.md docs/AnotherFakeApi.md @@ -116,6 +118,8 @@ src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md index fdc4b49e799d..99c92a26a6b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md @@ -147,6 +147,8 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.Activity](docs/Activity.md) + - [Model.ActivityOutputElementRepresentation](docs/ActivityOutputElementRepresentation.md) - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Model.Animal](docs/Animal.md) - [Model.ApiResponse](docs/ApiResponse.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/Activity.md new file mode 100644 index 000000000000..27a4e4571997 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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/docs/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..21f226b39525 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..62b70440f676 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Activity.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 +{ + /// + /// test map of maps + /// + [DataContract(Name = "Activity")] + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs. + public Activity(Dictionary> activityOutputs = default(Dictionary>)) + { + this._ActivityOutputs = activityOutputs; + if (this.ActivityOutputs != null) + { + this._flagActivityOutputs = true; + } + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ActivityOutputs + /// + [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] + public Dictionary> ActivityOutputs + { + get{ return _ActivityOutputs;} + set + { + _ActivityOutputs = value; + _flagActivityOutputs = true; + } + } + private Dictionary> _ActivityOutputs; + private bool _flagActivityOutputs; + + /// + /// Returns false as ActivityOutputs should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeActivityOutputs() + { + return _flagActivityOutputs; + } + /// + /// 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 Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).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 Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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-ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..7395af5fbf16 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -0,0 +1,189 @@ +/* + * 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 +{ + /// + /// ActivityOutputElementRepresentation + /// + [DataContract(Name = "ActivityOutputElementRepresentation")] + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1. + /// prop2. + public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + { + this._Prop1 = prop1; + if (this.Prop1 != null) + { + this._flagProp1 = true; + } + this._Prop2 = prop2; + if (this.Prop2 != null) + { + this._flagProp2 = true; + } + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Prop1 + /// + [DataMember(Name = "prop1", EmitDefaultValue = false)] + public string Prop1 + { + get{ return _Prop1;} + set + { + _Prop1 = value; + _flagProp1 = true; + } + } + private string _Prop1; + private bool _flagProp1; + + /// + /// Returns false as Prop1 should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeProp1() + { + return _flagProp1; + } + /// + /// Gets or Sets Prop2 + /// + [DataMember(Name = "prop2", EmitDefaultValue = false)] + public Object Prop2 + { + get{ return _Prop2;} + set + { + _Prop2 = value; + _flagProp2 = true; + } + } + private Object _Prop2; + private bool _flagProp2; + + /// + /// Returns false as Prop2 should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeProp2() + { + return _flagProp2; + } + /// + /// 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 ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).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 ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.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-generichost-net6.0-nrt/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES index 9a99c9d18bcd..cf0f5c871be4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES @@ -9,6 +9,8 @@ docs/apis/FakeClassnameTags123Api.md docs/apis/PetApi.md docs/apis/StoreApi.md docs/apis/UserApi.md +docs/models/Activity.md +docs/models/ActivityOutputElementRepresentation.md docs/models/AdditionalPropertiesClass.md docs/models/Animal.md docs/models/ApiResponse.md @@ -115,6 +117,8 @@ src/Org.OpenAPITools/Client/RateLimitProvider`1.cs src/Org.OpenAPITools/Client/TokenBase.cs src/Org.OpenAPITools/Client/TokenContainer`1.cs src/Org.OpenAPITools/Client/TokenProvider`1.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Activity.md new file mode 100644 index 000000000000..6f69ec32545d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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-generichost-net6.0-nrt/docs/models/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..33d79a27692f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..d8753f6553eb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Activity.cs @@ -0,0 +1,121 @@ +// +/* + * 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 + */ + +#nullable enable + +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 System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// test map of maps + /// + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs + public Activity(Dictionary>? activityOutputs = default) + { + ActivityOutputs = activityOutputs; + } + + /// + /// Gets or Sets ActivityOutputs + /// + [JsonPropertyName("activity_outputs")] + public Dictionary>? ActivityOutputs { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object? input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity? 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..2cd5bb9372e9 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -0,0 +1,134 @@ +// +/* + * 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 + */ + +#nullable enable + +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 System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ActivityOutputElementRepresentation + /// + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1 + /// prop2 + public ActivityOutputElementRepresentation(string? prop1 = default, Object? prop2 = default) + { + Prop1 = prop1; + Prop2 = prop2; + } + + /// + /// Gets or Sets Prop1 + /// + [JsonPropertyName("prop1")] + public string? Prop1 { get; set; } + + /// + /// Gets or Sets Prop2 + /// + [JsonPropertyName("prop2")] + public Object? Prop2 { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object? input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation? 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.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-generichost-net6.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES index 9a99c9d18bcd..cf0f5c871be4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES @@ -9,6 +9,8 @@ docs/apis/FakeClassnameTags123Api.md docs/apis/PetApi.md docs/apis/StoreApi.md docs/apis/UserApi.md +docs/models/Activity.md +docs/models/ActivityOutputElementRepresentation.md docs/models/AdditionalPropertiesClass.md docs/models/Animal.md docs/models/ApiResponse.md @@ -115,6 +117,8 @@ src/Org.OpenAPITools/Client/RateLimitProvider`1.cs src/Org.OpenAPITools/Client/TokenBase.cs src/Org.OpenAPITools/Client/TokenContainer`1.cs src/Org.OpenAPITools/Client/TokenProvider`1.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Activity.md new file mode 100644 index 000000000000..6f69ec32545d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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-generichost-net6.0/docs/models/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..33d79a27692f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..68647a4ae15a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Activity.cs @@ -0,0 +1,119 @@ +// +/* + * 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 System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// test map of maps + /// + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs + public Activity(Dictionary> activityOutputs = default) + { + ActivityOutputs = activityOutputs; + } + + /// + /// Gets or Sets ActivityOutputs + /// + [JsonPropertyName("activity_outputs")] + public Dictionary> ActivityOutputs { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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-generichost-net6.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..ed290bab607e --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.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 System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ActivityOutputElementRepresentation + /// + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1 + /// prop2 + public ActivityOutputElementRepresentation(string prop1 = default, Object prop2 = default) + { + Prop1 = prop1; + Prop2 = prop2; + } + + /// + /// Gets or Sets Prop1 + /// + [JsonPropertyName("prop1")] + public string Prop1 { get; set; } + + /// + /// Gets or Sets Prop2 + /// + [JsonPropertyName("prop2")] + public Object Prop2 { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.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-generichost-netstandard2.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES index 9a99c9d18bcd..cf0f5c871be4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES @@ -9,6 +9,8 @@ docs/apis/FakeClassnameTags123Api.md docs/apis/PetApi.md docs/apis/StoreApi.md docs/apis/UserApi.md +docs/models/Activity.md +docs/models/ActivityOutputElementRepresentation.md docs/models/AdditionalPropertiesClass.md docs/models/Animal.md docs/models/ApiResponse.md @@ -115,6 +117,8 @@ src/Org.OpenAPITools/Client/RateLimitProvider`1.cs src/Org.OpenAPITools/Client/TokenBase.cs src/Org.OpenAPITools/Client/TokenContainer`1.cs src/Org.OpenAPITools/Client/TokenProvider`1.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Activity.md new file mode 100644 index 000000000000..6f69ec32545d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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-generichost-netstandard2.0/docs/models/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..33d79a27692f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..68647a4ae15a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Activity.cs @@ -0,0 +1,119 @@ +// +/* + * 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 System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// test map of maps + /// + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs + public Activity(Dictionary> activityOutputs = default) + { + ActivityOutputs = activityOutputs; + } + + /// + /// Gets or Sets ActivityOutputs + /// + [JsonPropertyName("activity_outputs")] + public Dictionary> ActivityOutputs { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..ed290bab607e --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.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 System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ActivityOutputElementRepresentation + /// + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1 + /// prop2 + public ActivityOutputElementRepresentation(string prop1 = default, Object prop2 = default) + { + Prop1 = prop1; + Prop2 = prop2; + } + + /// + /// Gets or Sets Prop1 + /// + [JsonPropertyName("prop1")] + public string Prop1 { get; set; } + + /// + /// Gets or Sets Prop2 + /// + [JsonPropertyName("prop2")] + public Object Prop2 { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.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/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES index 3b9f82954547..95d1165749d9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES @@ -2,6 +2,8 @@ Org.OpenAPITools.sln README.md appveyor.yml +docs/Activity.md +docs/ActivityOutputElementRepresentation.md docs/AdditionalPropertiesClass.md docs/Animal.md docs/AnotherFakeApi.md @@ -113,6 +115,8 @@ src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Client/WebRequestPathBuilder.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md index f52ed7e7e685..ba5e4d45f47b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md @@ -172,6 +172,8 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.Activity](docs/Activity.md) + - [Model.ActivityOutputElementRepresentation](docs/ActivityOutputElementRepresentation.md) - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Model.Animal](docs/Animal.md) - [Model.ApiResponse](docs/ApiResponse.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/Activity.md new file mode 100644 index 000000000000..27a4e4571997 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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/docs/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..21f226b39525 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..a883381f9c77 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Activity.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 +{ + /// + /// test map of maps + /// + [DataContract(Name = "Activity")] + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs. + public Activity(Dictionary> activityOutputs = default(Dictionary>)) + { + this.ActivityOutputs = activityOutputs; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ActivityOutputs + /// + [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] + public Dictionary> ActivityOutputs { 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 Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).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 Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..065c023d0a5a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -0,0 +1,146 @@ +/* + * 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 +{ + /// + /// ActivityOutputElementRepresentation + /// + [DataContract(Name = "ActivityOutputElementRepresentation")] + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1. + /// prop2. + public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + { + this.Prop1 = prop1; + this.Prop2 = prop2; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Prop1 + /// + [DataMember(Name = "prop1", EmitDefaultValue = false)] + public string Prop1 { get; set; } + + /// + /// Gets or Sets Prop2 + /// + [DataMember(Name = "prop2", EmitDefaultValue = false)] + public Object Prop2 { 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 ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).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 ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.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/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES index e99cb9be46cc..917a723fcc61 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES @@ -2,6 +2,8 @@ Org.OpenAPITools.sln README.md appveyor.yml +docs/Activity.md +docs/ActivityOutputElementRepresentation.md docs/AdditionalPropertiesClass.md docs/Animal.md docs/AnotherFakeApi.md @@ -116,6 +118,8 @@ src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/README.md index b3a20c0c0833..aeefb0f54ef0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/README.md @@ -159,6 +159,8 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.Activity](docs/Activity.md) + - [Model.ActivityOutputElementRepresentation](docs/ActivityOutputElementRepresentation.md) - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Model.Animal](docs/Animal.md) - [Model.ApiResponse](docs/ApiResponse.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/Activity.md new file mode 100644 index 000000000000..27a4e4571997 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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/docs/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..21f226b39525 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..38f1573adb2a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Activity.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 +{ + /// + /// test map of maps + /// + [DataContract(Name = "Activity")] + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs. + public Activity(Dictionary> activityOutputs = default(Dictionary>)) + { + this.ActivityOutputs = activityOutputs; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ActivityOutputs + /// + [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] + public Dictionary> ActivityOutputs { 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 Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).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 Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..59a301721b20 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -0,0 +1,145 @@ +/* + * 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 +{ + /// + /// ActivityOutputElementRepresentation + /// + [DataContract(Name = "ActivityOutputElementRepresentation")] + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1. + /// prop2. + public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + { + this.Prop1 = prop1; + this.Prop2 = prop2; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Prop1 + /// + [DataMember(Name = "prop1", EmitDefaultValue = false)] + public string Prop1 { get; set; } + + /// + /// Gets or Sets Prop2 + /// + [DataMember(Name = "prop2", EmitDefaultValue = false)] + public Object Prop2 { 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 ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).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 ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.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/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/.openapi-generator/FILES index e99cb9be46cc..917a723fcc61 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/.openapi-generator/FILES @@ -2,6 +2,8 @@ Org.OpenAPITools.sln README.md appveyor.yml +docs/Activity.md +docs/ActivityOutputElementRepresentation.md docs/AdditionalPropertiesClass.md docs/Animal.md docs/AnotherFakeApi.md @@ -116,6 +118,8 @@ src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/README.md index b3a20c0c0833..aeefb0f54ef0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/README.md @@ -159,6 +159,8 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.Activity](docs/Activity.md) + - [Model.ActivityOutputElementRepresentation](docs/ActivityOutputElementRepresentation.md) - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Model.Animal](docs/Animal.md) - [Model.ApiResponse](docs/ApiResponse.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/Activity.md new file mode 100644 index 000000000000..27a4e4571997 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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/docs/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..21f226b39525 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..38f1573adb2a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/Activity.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 +{ + /// + /// test map of maps + /// + [DataContract(Name = "Activity")] + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs. + public Activity(Dictionary> activityOutputs = default(Dictionary>)) + { + this.ActivityOutputs = activityOutputs; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ActivityOutputs + /// + [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] + public Dictionary> ActivityOutputs { 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 Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).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 Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..59a301721b20 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -0,0 +1,145 @@ +/* + * 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 +{ + /// + /// ActivityOutputElementRepresentation + /// + [DataContract(Name = "ActivityOutputElementRepresentation")] + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1. + /// prop2. + public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + { + this.Prop1 = prop1; + this.Prop2 = prop2; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Prop1 + /// + [DataMember(Name = "prop1", EmitDefaultValue = false)] + public string Prop1 { get; set; } + + /// + /// Gets or Sets Prop2 + /// + [DataMember(Name = "prop2", EmitDefaultValue = false)] + public Object Prop2 { 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 ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).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 ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.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/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES index e99cb9be46cc..917a723fcc61 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES @@ -2,6 +2,8 @@ Org.OpenAPITools.sln README.md appveyor.yml +docs/Activity.md +docs/ActivityOutputElementRepresentation.md docs/AdditionalPropertiesClass.md docs/Animal.md docs/AnotherFakeApi.md @@ -116,6 +118,8 @@ src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md index b3a20c0c0833..aeefb0f54ef0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md @@ -159,6 +159,8 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.Activity](docs/Activity.md) + - [Model.ActivityOutputElementRepresentation](docs/ActivityOutputElementRepresentation.md) - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Model.Animal](docs/Animal.md) - [Model.ApiResponse](docs/ApiResponse.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Activity.md new file mode 100644 index 000000000000..27a4e4571997 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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/docs/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..21f226b39525 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..38f1573adb2a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Activity.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 +{ + /// + /// test map of maps + /// + [DataContract(Name = "Activity")] + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs. + public Activity(Dictionary> activityOutputs = default(Dictionary>)) + { + this.ActivityOutputs = activityOutputs; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ActivityOutputs + /// + [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] + public Dictionary> ActivityOutputs { 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 Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).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 Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..59a301721b20 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -0,0 +1,145 @@ +/* + * 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 +{ + /// + /// ActivityOutputElementRepresentation + /// + [DataContract(Name = "ActivityOutputElementRepresentation")] + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1. + /// prop2. + public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + { + this.Prop1 = prop1; + this.Prop2 = prop2; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Prop1 + /// + [DataMember(Name = "prop1", EmitDefaultValue = false)] + public string Prop1 { get; set; } + + /// + /// Gets or Sets Prop2 + /// + [DataMember(Name = "prop2", EmitDefaultValue = false)] + public Object Prop2 { 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 ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).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 ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.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 ba71e29dcc7e..59f6d50ea71d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES @@ -2,6 +2,8 @@ Org.OpenAPITools.sln README.md appveyor.yml +docs/Activity.md +docs/ActivityOutputElementRepresentation.md docs/AdditionalPropertiesClass.md docs/Animal.md docs/AnotherFakeApi.md @@ -115,6 +117,8 @@ src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md index fdc4b49e799d..99c92a26a6b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md @@ -147,6 +147,8 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.Activity](docs/Activity.md) + - [Model.ActivityOutputElementRepresentation](docs/ActivityOutputElementRepresentation.md) - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Model.Animal](docs/Animal.md) - [Model.ApiResponse](docs/ApiResponse.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Activity.md new file mode 100644 index 000000000000..27a4e4571997 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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/docs/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..21f226b39525 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..38f1573adb2a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Activity.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 +{ + /// + /// test map of maps + /// + [DataContract(Name = "Activity")] + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs. + public Activity(Dictionary> activityOutputs = default(Dictionary>)) + { + this.ActivityOutputs = activityOutputs; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ActivityOutputs + /// + [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] + public Dictionary> ActivityOutputs { 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 Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).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 Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..59a301721b20 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -0,0 +1,145 @@ +/* + * 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 +{ + /// + /// ActivityOutputElementRepresentation + /// + [DataContract(Name = "ActivityOutputElementRepresentation")] + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1. + /// prop2. + public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + { + this.Prop1 = prop1; + this.Prop2 = prop2; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Prop1 + /// + [DataMember(Name = "prop1", EmitDefaultValue = false)] + public string Prop1 { get; set; } + + /// + /// Gets or Sets Prop2 + /// + [DataMember(Name = "prop2", EmitDefaultValue = false)] + public Object Prop2 { 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 ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).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 ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.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 ba71e29dcc7e..59f6d50ea71d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES @@ -2,6 +2,8 @@ Org.OpenAPITools.sln README.md appveyor.yml +docs/Activity.md +docs/ActivityOutputElementRepresentation.md docs/AdditionalPropertiesClass.md docs/Animal.md docs/AnotherFakeApi.md @@ -115,6 +117,8 @@ src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +src/Org.OpenAPITools/Model/Activity.cs +src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md index b3a20c0c0833..aeefb0f54ef0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md @@ -159,6 +159,8 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.Activity](docs/Activity.md) + - [Model.ActivityOutputElementRepresentation](docs/ActivityOutputElementRepresentation.md) - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Model.Animal](docs/Animal.md) - [Model.ApiResponse](docs/ApiResponse.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Activity.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Activity.md new file mode 100644 index 000000000000..27a4e4571997 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Activity.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Activity +test map of maps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [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/docs/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ActivityOutputElementRepresentation.md new file mode 100644 index 000000000000..21f226b39525 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ActivityOutputElementRepresentation.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ActivityOutputElementRepresentation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prop1** | **string** | | [optional] +**Prop2** | **Object** | | [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/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs new file mode 100644 index 000000000000..f211a64884af --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -0,0 +1,78 @@ +/* + * 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 ActivityOutputElementRepresentation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityOutputElementRepresentationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityOutputElementRepresentation + //private ActivityOutputElementRepresentation instance; + + public ActivityOutputElementRepresentationTests() + { + // TODO uncomment below to create an instance of ActivityOutputElementRepresentation + //instance = new ActivityOutputElementRepresentation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivityOutputElementRepresentation + /// + [Fact] + public void ActivityOutputElementRepresentationInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityOutputElementRepresentation + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Prop1' + /// + [Fact] + public void Prop1Test() + { + // TODO unit test for the property 'Prop1' + } + /// + /// Test the property 'Prop2' + /// + [Fact] + public void Prop2Test() + { + // TODO unit test for the property 'Prop2' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/ActivityTests.cs new file mode 100644 index 000000000000..afe9e846ee94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/ActivityTests.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 Activity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Activity + //private Activity instance; + + public ActivityTests() + { + // TODO uncomment below to create an instance of Activity + //instance = new Activity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Activity + /// + [Fact] + public void ActivityInstanceTest() + { + // TODO uncomment below to test "IsType" Activity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActivityOutputs' + /// + [Fact] + public void ActivityOutputsTest() + { + // TODO unit test for the property 'ActivityOutputs' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Activity.cs new file mode 100644 index 000000000000..625d71bfff77 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Activity.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 +{ + /// + /// test map of maps + /// + [DataContract(Name = "Activity")] + public partial class Activity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// activityOutputs. + public Activity(Dictionary> activityOutputs = default(Dictionary>)) + { + this.ActivityOutputs = activityOutputs; + } + + /// + /// Gets or Sets ActivityOutputs + /// + [DataMember(Name = "activity_outputs", EmitDefaultValue = false)] + public Dictionary> ActivityOutputs { 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 Activity {\n"); + sb.Append(" ActivityOutputs: ").Append(ActivityOutputs).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 Activity).AreEqual; + } + + /// + /// Returns true if Activity instances are equal + /// + /// Instance of Activity to be compared + /// Boolean + public bool Equals(Activity 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.ActivityOutputs != null) + { + hashCode = (hashCode * 59) + this.ActivityOutputs.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/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs new file mode 100644 index 000000000000..677b79cc20d6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.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 OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ActivityOutputElementRepresentation + /// + [DataContract(Name = "ActivityOutputElementRepresentation")] + public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// prop1. + /// prop2. + public ActivityOutputElementRepresentation(string prop1 = default(string), Object prop2 = default(Object)) + { + this.Prop1 = prop1; + this.Prop2 = prop2; + } + + /// + /// Gets or Sets Prop1 + /// + [DataMember(Name = "prop1", EmitDefaultValue = false)] + public string Prop1 { get; set; } + + /// + /// Gets or Sets Prop2 + /// + [DataMember(Name = "prop2", EmitDefaultValue = false)] + public Object Prop2 { 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 ActivityOutputElementRepresentation {\n"); + sb.Append(" Prop1: ").Append(Prop1).Append("\n"); + sb.Append(" Prop2: ").Append(Prop2).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 ActivityOutputElementRepresentation).AreEqual; + } + + /// + /// Returns true if ActivityOutputElementRepresentation instances are equal + /// + /// Instance of ActivityOutputElementRepresentation to be compared + /// Boolean + public bool Equals(ActivityOutputElementRepresentation 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.Prop1 != null) + { + hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); + } + if (this.Prop2 != null) + { + hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +}