diff --git a/bin/configs/csharp-netcore-OpenAPIClient.yaml b/bin/configs/csharp-netcore-OpenAPIClient.yaml
index 22734fef4542..d7b96a7bf16f 100644
--- a/bin/configs/csharp-netcore-OpenAPIClient.yaml
+++ b/bin/configs/csharp-netcore-OpenAPIClient.yaml
@@ -4,4 +4,5 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-e
templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
- useCompareNetObjects: "true"
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/model.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/model.mustache
index d952a614719a..26ce826e0301 100644
--- a/modules/openapi-generator/src/main/resources/csharp-netcore/model.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp-netcore/model.mustache
@@ -25,9 +25,9 @@ using OpenAPIDateConverter = {{packageName}}.Client.OpenAPIDateConverter;
{{#useCompareNetObjects}}
using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils;
{{/useCompareNetObjects}}
-
{{#models}}
{{#model}}
+
namespace {{packageName}}.{{modelPackage}}
{
{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>modelGeneric}}{{/isEnum}}
diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache
index aa94c5557915..0c2548c44b85 100644
--- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache
@@ -43,7 +43,15 @@
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
+ {{^isAdditionalPropertiesTrue}}
protected {{classname}}() { }
+ {{/isAdditionalPropertiesTrue}}
+ {{#isAdditionalPropertiesTrue}}
+ protected {{classname}}()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
+ {{/isAdditionalPropertiesTrue}}
{{/hasOnlyReadOnly}}
{{/hasRequired}}
///
@@ -92,6 +100,9 @@
{{/isReadOnly}}
{{/isInherited}}
{{/vars}}
+ {{#isAdditionalPropertiesTrue}}
+ this.AdditionalProperties = new Dictionary();
+ {{/isAdditionalPropertiesTrue}}
}
{{#vars}}
@@ -101,13 +112,23 @@
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
/// {{#description}}
/// {{description}}{{/description}}
- [DataMember(Name = "{{baseName}}", EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})]{{#isDate}}
- [JsonConverter(typeof(OpenAPIDateConverter))]{{/isDate}}
+ [DataMember(Name = "{{baseName}}", EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})]
+ {{#isDate}}
+ [JsonConverter(typeof(OpenAPIDateConverter))]
+ {{/isDate}}
public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
{{/isEnum}}
{{/isInherited}}
{{/vars}}
+ {{#isAdditionalPropertiesTrue}}
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
+ {{/isAdditionalPropertiesTrue}}
///
/// Returns the string presentation of the object
///
@@ -122,6 +143,9 @@
{{#vars}}
sb.Append(" {{name}}: ").Append({{name}}).Append("\n");
{{/vars}}
+ {{#isAdditionalPropertiesTrue}}
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
+ {{/isAdditionalPropertiesTrue}}
sb.Append("}\n");
return sb.ToString();
}
@@ -180,7 +204,10 @@
{{^vendorExtensions.x-is-value-type}}this.{{name}} != null &&
input.{{name}} != null &&
{{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}})
- ){{#hasMore}} && {{/hasMore}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}};
+ ){{#hasMore}} && {{/hasMore}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}}
+ {{#isAdditionalPropertiesTrue}}
+ && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
+ {{/isAdditionalPropertiesTrue}}
{{/useCompareNetObjects}}
}
@@ -207,6 +234,10 @@
hashCode = hashCode * 59 + this.{{name}}.GetHashCode();
{{/vendorExtensions.x-is-value-type}}
{{/vars}}
+ {{#isAdditionalPropertiesTrue}}
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
+ {{/isAdditionalPropertiesTrue}}
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs
index a680938da9cc..eb7a585e6ff2 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs
@@ -105,6 +105,17 @@ public void TestSerialization()
// create pet
Pet p1 = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" });
Assert.Equal("{\"name\":\"Csharp test\",\"photoUrls\":[\"http://petstore.com/csharp_test\"]}", JsonConvert.SerializeObject(p1));
+
+ // test additonal properties (serialization)
+ Pet p2 = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" });
+ p2.AdditionalProperties.Add("hello", "world");
+ Assert.Equal("{\"name\":\"Csharp test\",\"photoUrls\":[\"http://petstore.com/csharp_test\"],\"hello\":\"world\"}", JsonConvert.SerializeObject(p2));
+
+ // test additonal properties (deserialization)
+ Pet p3 = JsonConvert.DeserializeObject("{\"name\":\"Csharp test\",\"photoUrls\":[\"http://petstore.com/csharp_test\"],\"hello\":\"world\",\"int\":123}");
+ Assert.Equal("Csharp test", p3.Name);
+ Assert.Equal("world", p3.AdditionalProperties["hello"]);
+ Assert.Equal(123L, p3.AdditionalProperties["int"]);
}
///
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs
deleted file mode 100644
index fe9de3aa27cf..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// AdditionalPropertiesAnyType
- ///
- [DataContract]
- public partial class AdditionalPropertiesAnyType : Dictionary, IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// name.
- public AdditionalPropertiesAnyType(string name = default(string)) : base()
- {
- this.Name = name;
- }
-
- ///
- /// Gets or Sets Name
- ///
- [DataMember(Name="name", EmitDefaultValue=false)]
- public string Name { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class AdditionalPropertiesAnyType {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append(" Name: ").Append(Name).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public string ToJson()
- {
- return JsonConvert.SerializeObject(this, 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 AdditionalPropertiesAnyType).AreEqual;
- }
-
- ///
- /// Returns true if AdditionalPropertiesAnyType instances are equal
- ///
- /// Instance of AdditionalPropertiesAnyType to be compared
- /// Boolean
- public bool Equals(AdditionalPropertiesAnyType 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 = base.GetHashCode();
- if (this.Name != null)
- hashCode = hashCode * 59 + this.Name.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs
deleted file mode 100644
index 46e6973df032..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// AdditionalPropertiesArray
- ///
- [DataContract]
- public partial class AdditionalPropertiesArray : Dictionary, IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// name.
- public AdditionalPropertiesArray(string name = default(string)) : base()
- {
- this.Name = name;
- }
-
- ///
- /// Gets or Sets Name
- ///
- [DataMember(Name="name", EmitDefaultValue=false)]
- public string Name { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class AdditionalPropertiesArray {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append(" Name: ").Append(Name).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public string ToJson()
- {
- return JsonConvert.SerializeObject(this, 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 AdditionalPropertiesArray).AreEqual;
- }
-
- ///
- /// Returns true if AdditionalPropertiesArray instances are equal
- ///
- /// Instance of AdditionalPropertiesArray to be compared
- /// Boolean
- public bool Equals(AdditionalPropertiesArray 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 = base.GetHashCode();
- if (this.Name != null)
- hashCode = hashCode * 59 + this.Name.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs
deleted file mode 100644
index e21c5085cefa..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// AdditionalPropertiesBoolean
- ///
- [DataContract]
- public partial class AdditionalPropertiesBoolean : Dictionary, IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// name.
- public AdditionalPropertiesBoolean(string name = default(string)) : base()
- {
- this.Name = name;
- }
-
- ///
- /// Gets or Sets Name
- ///
- [DataMember(Name="name", EmitDefaultValue=false)]
- public string Name { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class AdditionalPropertiesBoolean {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append(" Name: ").Append(Name).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public string ToJson()
- {
- return JsonConvert.SerializeObject(this, 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 AdditionalPropertiesBoolean).AreEqual;
- }
-
- ///
- /// Returns true if AdditionalPropertiesBoolean instances are equal
- ///
- /// Instance of AdditionalPropertiesBoolean to be compared
- /// Boolean
- public bool Equals(AdditionalPropertiesBoolean 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 = base.GetHashCode();
- if (this.Name != null)
- hashCode = hashCode * 59 + this.Name.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs
index 89ec5cacfe86..368ae0e998c9 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs
@@ -40,6 +40,7 @@ public partial class AdditionalPropertiesClass : IEquatable();
}
///
@@ -54,6 +55,12 @@ public partial class AdditionalPropertiesClass : IEquatable> MapOfMapProperty { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -64,6 +71,7 @@ public override string ToString()
sb.Append("class AdditionalPropertiesClass {\n");
sb.Append(" MapProperty: ").Append(MapProperty).Append("\n");
sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -110,6 +118,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.MapProperty.GetHashCode();
if (this.MapOfMapProperty != null)
hashCode = hashCode * 59 + this.MapOfMapProperty.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs
deleted file mode 100644
index ceff9d7354e4..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// AdditionalPropertiesInteger
- ///
- [DataContract]
- public partial class AdditionalPropertiesInteger : Dictionary, IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// name.
- public AdditionalPropertiesInteger(string name = default(string)) : base()
- {
- this.Name = name;
- }
-
- ///
- /// Gets or Sets Name
- ///
- [DataMember(Name="name", EmitDefaultValue=false)]
- public string Name { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class AdditionalPropertiesInteger {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append(" Name: ").Append(Name).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public string ToJson()
- {
- return JsonConvert.SerializeObject(this, 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 AdditionalPropertiesInteger).AreEqual;
- }
-
- ///
- /// Returns true if AdditionalPropertiesInteger instances are equal
- ///
- /// Instance of AdditionalPropertiesInteger to be compared
- /// Boolean
- public bool Equals(AdditionalPropertiesInteger 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 = base.GetHashCode();
- if (this.Name != null)
- hashCode = hashCode * 59 + this.Name.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs
deleted file mode 100644
index db37cf7ce657..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// AdditionalPropertiesNumber
- ///
- [DataContract]
- public partial class AdditionalPropertiesNumber : Dictionary, IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// name.
- public AdditionalPropertiesNumber(string name = default(string)) : base()
- {
- this.Name = name;
- }
-
- ///
- /// Gets or Sets Name
- ///
- [DataMember(Name="name", EmitDefaultValue=false)]
- public string Name { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class AdditionalPropertiesNumber {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append(" Name: ").Append(Name).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public string ToJson()
- {
- return JsonConvert.SerializeObject(this, 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 AdditionalPropertiesNumber).AreEqual;
- }
-
- ///
- /// Returns true if AdditionalPropertiesNumber instances are equal
- ///
- /// Instance of AdditionalPropertiesNumber to be compared
- /// Boolean
- public bool Equals(AdditionalPropertiesNumber 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 = base.GetHashCode();
- if (this.Name != null)
- hashCode = hashCode * 59 + this.Name.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs
deleted file mode 100644
index ee5b67b2ebd1..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// AdditionalPropertiesObject
- ///
- [DataContract]
- public partial class AdditionalPropertiesObject : Dictionary>, IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// name.
- public AdditionalPropertiesObject(string name = default(string)) : base()
- {
- this.Name = name;
- }
-
- ///
- /// Gets or Sets Name
- ///
- [DataMember(Name="name", EmitDefaultValue=false)]
- public string Name { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class AdditionalPropertiesObject {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append(" Name: ").Append(Name).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public string ToJson()
- {
- return JsonConvert.SerializeObject(this, 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 AdditionalPropertiesObject).AreEqual;
- }
-
- ///
- /// Returns true if AdditionalPropertiesObject instances are equal
- ///
- /// Instance of AdditionalPropertiesObject to be compared
- /// Boolean
- public bool Equals(AdditionalPropertiesObject 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 = base.GetHashCode();
- if (this.Name != null)
- hashCode = hashCode * 59 + this.Name.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs
deleted file mode 100644
index 29dbad58cac7..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// AdditionalPropertiesString
- ///
- [DataContract]
- public partial class AdditionalPropertiesString : Dictionary, IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// name.
- public AdditionalPropertiesString(string name = default(string)) : base()
- {
- this.Name = name;
- }
-
- ///
- /// Gets or Sets Name
- ///
- [DataMember(Name="name", EmitDefaultValue=false)]
- public string Name { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class AdditionalPropertiesString {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append(" Name: ").Append(Name).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public string ToJson()
- {
- return JsonConvert.SerializeObject(this, 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 AdditionalPropertiesString).AreEqual;
- }
-
- ///
- /// Returns true if AdditionalPropertiesString instances are equal
- ///
- /// Instance of AdditionalPropertiesString to be compared
- /// Boolean
- public bool Equals(AdditionalPropertiesString 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 = base.GetHashCode();
- if (this.Name != null)
- hashCode = hashCode * 59 + this.Name.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs
index e8ee350b38be..fd02679a53d8 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs
@@ -41,7 +41,10 @@ public partial class Animal : IEquatable, IValidatableObject
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected Animal() { }
+ protected Animal()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -53,6 +56,7 @@ protected Animal() { }
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");
// use default value if no "color" provided
this.Color = color ?? "red";
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -67,6 +71,12 @@ protected Animal() { }
[DataMember(Name = "color", EmitDefaultValue = false)]
public string Color { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -77,6 +87,7 @@ public override string ToString()
sb.Append("class Animal {\n");
sb.Append(" ClassName: ").Append(ClassName).Append("\n");
sb.Append(" Color: ").Append(Color).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -123,6 +134,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.ClassName.GetHashCode();
if (this.Color != null)
hashCode = hashCode * 59 + this.Color.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AnimalFarm.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AnimalFarm.cs
deleted file mode 100644
index b4ebc8d959c0..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AnimalFarm.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * OpenAPI Petstore
- *
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * OpenAPI spec version: 1.0.0
- *
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using System;
-using System.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// AnimalFarm
- ///
- [DataContract]
- public partial class AnimalFarm : List, IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- public AnimalFarm() : base()
- {
- }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class AnimalFarm {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public string ToJson()
- {
- return JsonConvert.SerializeObject(this, Formatting.Indented);
- }
-
- ///
- /// Returns true if objects are equal
- ///
- /// Object to be compared
- /// Boolean
- public override bool Equals(object input)
- {
- return this.Equals(input as AnimalFarm);
- }
-
- ///
- /// Returns true if AnimalFarm instances are equal
- ///
- /// Instance of AnimalFarm to be compared
- /// Boolean
- public bool Equals(AnimalFarm input)
- {
- if (input == null)
- return false;
-
- return base.Equals(input);
- }
-
- ///
- /// Gets the hash code
- ///
- /// Hash code
- public override int GetHashCode()
- {
- unchecked // Overflow is fine, just wrap
- {
- int hashCode = base.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs
index b23c90ca4b51..15d1c02b2b02 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs
@@ -42,6 +42,7 @@ public partial class ApiResponse : IEquatable, IValidatableObject
this.Code = code;
this.Type = type;
this.Message = message;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -62,6 +63,12 @@ public partial class ApiResponse : IEquatable, IValidatableObject
[DataMember(Name = "message", EmitDefaultValue = false)]
public string Message { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -73,6 +80,7 @@ public override string ToString()
sb.Append(" Code: ").Append(Code).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" Message: ").Append(Message).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -120,6 +128,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Type.GetHashCode();
if (this.Message != null)
hashCode = hashCode * 59 + this.Message.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs
index d069b1313c85..1b90907f02b1 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs
@@ -38,6 +38,7 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable> arrayArrayNumber = default(List>))
{
this.ArrayArrayNumber = arrayArrayNumber;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable> ArrayArrayNumber { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class ArrayOfArrayOfNumberOnly {\n");
sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -99,6 +107,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.ArrayArrayNumber != null)
hashCode = hashCode * 59 + this.ArrayArrayNumber.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs
index 43b4a3ee9b75..16a5cfd12c99 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs
@@ -38,6 +38,7 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat
public ArrayOfNumberOnly(List arrayNumber = default(List))
{
this.ArrayNumber = arrayNumber;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat
[DataMember(Name = "ArrayNumber", EmitDefaultValue = false)]
public List ArrayNumber { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class ArrayOfNumberOnly {\n");
sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -99,6 +107,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.ArrayNumber != null)
hashCode = hashCode * 59 + this.ArrayNumber.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs
index aa283d3403eb..6f84a8be3e79 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs
@@ -42,6 +42,7 @@ public partial class ArrayTest : IEquatable, IValidatableObject
this.ArrayOfString = arrayOfString;
this.ArrayArrayOfInteger = arrayArrayOfInteger;
this.ArrayArrayOfModel = arrayArrayOfModel;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -62,6 +63,12 @@ public partial class ArrayTest : IEquatable, IValidatableObject
[DataMember(Name = "array_array_of_model", EmitDefaultValue = false)]
public List> ArrayArrayOfModel { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -73,6 +80,7 @@ public override string ToString()
sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n");
sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n");
sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -121,6 +129,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.ArrayArrayOfInteger.GetHashCode();
if (this.ArrayArrayOfModel != null)
hashCode = hashCode * 59 + this.ArrayArrayOfModel.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BigCat.cs
deleted file mode 100644
index 2fd960256c46..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BigCat.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// BigCat
- ///
- [DataContract]
- public partial class BigCat : Cat, IEquatable, IValidatableObject
- {
- ///
- /// Defines Kind
- ///
- [JsonConverter(typeof(StringEnumConverter))]
- public enum KindEnum
- {
- ///
- /// Enum Lions for value: lions
- ///
- [EnumMember(Value = "lions")]
- Lions = 1,
-
- ///
- /// Enum Tigers for value: tigers
- ///
- [EnumMember(Value = "tigers")]
- Tigers = 2,
-
- ///
- /// Enum Leopards for value: leopards
- ///
- [EnumMember(Value = "leopards")]
- Leopards = 3,
-
- ///
- /// Enum Jaguars for value: jaguars
- ///
- [EnumMember(Value = "jaguars")]
- Jaguars = 4
-
- }
-
- ///
- /// Gets or Sets Kind
- ///
- [DataMember(Name="kind", EmitDefaultValue=false)]
- public KindEnum? Kind { get; set; }
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- protected BigCat() { }
- ///
- /// Initializes a new instance of the class.
- ///
- /// kind.
- /// className (required).
- /// color (default to "red").
- /// declawed.
- public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed)
- {
- this.Kind = kind;
- }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class BigCat {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append(" Kind: ").Append(Kind).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public override string ToJson()
- {
- return JsonConvert.SerializeObject(this, 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 BigCat).AreEqual;
- }
-
- ///
- /// Returns true if BigCat instances are equal
- ///
- /// Instance of BigCat to be compared
- /// Boolean
- public bool Equals(BigCat 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 = base.GetHashCode();
- hashCode = hashCode * 59 + this.Kind.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- foreach(var x in BaseValidate(validationContext)) yield return x;
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BigCatAllOf.cs
deleted file mode 100644
index 5244a8f34882..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BigCatAllOf.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// BigCatAllOf
- ///
- [DataContract]
- public partial class BigCatAllOf : IEquatable, IValidatableObject
- {
- ///
- /// Defines Kind
- ///
- [JsonConverter(typeof(StringEnumConverter))]
- public enum KindEnum
- {
- ///
- /// Enum Lions for value: lions
- ///
- [EnumMember(Value = "lions")]
- Lions = 1,
-
- ///
- /// Enum Tigers for value: tigers
- ///
- [EnumMember(Value = "tigers")]
- Tigers = 2,
-
- ///
- /// Enum Leopards for value: leopards
- ///
- [EnumMember(Value = "leopards")]
- Leopards = 3,
-
- ///
- /// Enum Jaguars for value: jaguars
- ///
- [EnumMember(Value = "jaguars")]
- Jaguars = 4
-
- }
-
- ///
- /// Gets or Sets Kind
- ///
- [DataMember(Name="kind", EmitDefaultValue=false)]
- public KindEnum? Kind { get; set; }
- ///
- /// Initializes a new instance of the class.
- ///
- /// kind.
- public BigCatAllOf(KindEnum? kind = default(KindEnum?))
- {
- this.Kind = kind;
- }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class BigCatAllOf {\n");
- sb.Append(" Kind: ").Append(Kind).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 JsonConvert.SerializeObject(this, 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 BigCatAllOf).AreEqual;
- }
-
- ///
- /// Returns true if BigCatAllOf instances are equal
- ///
- /// Instance of BigCatAllOf to be compared
- /// Boolean
- public bool Equals(BigCatAllOf 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;
- hashCode = hashCode * 59 + this.Kind.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Capitalization.cs
index d8f6d0e16b73..54a68abcbe1a 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Capitalization.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Capitalization.cs
@@ -48,6 +48,7 @@ public partial class Capitalization : IEquatable, IValidatableOb
this.CapitalSnake = capitalSnake;
this.SCAETHFlowPoints = sCAETHFlowPoints;
this.ATT_NAME = aTTNAME;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -87,6 +88,12 @@ public partial class Capitalization : IEquatable, IValidatableOb
[DataMember(Name = "ATT_NAME", EmitDefaultValue = false)]
public string ATT_NAME { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -101,6 +108,7 @@ public override string ToString()
sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n");
sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n");
sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -155,6 +163,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.SCAETHFlowPoints.GetHashCode();
if (this.ATT_NAME != null)
hashCode = hashCode * 59 + this.ATT_NAME.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs
index 36301ec6388d..bec79a75940e 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs
@@ -35,7 +35,10 @@ public partial class Cat : Animal, IEquatable, IValidatableObject
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected Cat() { }
+ protected Cat()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -45,6 +48,7 @@ protected Cat() { }
public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color)
{
this.Declawed = declawed;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -53,6 +57,12 @@ protected Cat() { }
[DataMember(Name = "declawed", EmitDefaultValue = false)]
public bool Declawed { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -63,6 +73,7 @@ public override string ToString()
sb.Append("class Cat {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" Declawed: ").Append(Declawed).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -106,6 +117,8 @@ public override int GetHashCode()
{
int hashCode = base.GetHashCode();
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/CatAllOf.cs
index 1bda8d00dc81..62b350eb041a 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/CatAllOf.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/CatAllOf.cs
@@ -38,6 +38,7 @@ public partial class CatAllOf : IEquatable, IValidatableObject
public CatAllOf(bool declawed = default(bool))
{
this.Declawed = declawed;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class CatAllOf : IEquatable, IValidatableObject
[DataMember(Name = "declawed", EmitDefaultValue = false)]
public bool Declawed { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class CatAllOf {\n");
sb.Append(" Declawed: ").Append(Declawed).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -98,6 +106,8 @@ public override int GetHashCode()
{
int hashCode = 41;
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs
index 2d8b422cf89b..fe4be5254661 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs
@@ -35,7 +35,10 @@ public partial class Category : IEquatable, IValidatableObject
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected Category() { }
+ protected Category()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -46,6 +49,7 @@ protected Category() { }
// to ensure "name" is required (not null)
this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");
this.Id = id;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -60,6 +64,12 @@ protected Category() { }
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -70,6 +80,7 @@ public override string ToString()
sb.Append("class Category {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -115,6 +126,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ClassModel.cs
index ae482ee8633d..fe84bf5dc6e7 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ClassModel.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ClassModel.cs
@@ -38,6 +38,7 @@ public partial class ClassModel : IEquatable, IValidatableObject
public ClassModel(string _class = default(string))
{
this.Class = _class;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class ClassModel : IEquatable, IValidatableObject
[DataMember(Name = "_class", EmitDefaultValue = false)]
public string Class { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class ClassModel {\n");
sb.Append(" Class: ").Append(Class).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -99,6 +107,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.Class != null)
hashCode = hashCode * 59 + this.Class.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Dog.cs
index 15b7a28ef1a4..220ada0748b3 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Dog.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Dog.cs
@@ -35,7 +35,10 @@ public partial class Dog : Animal, IEquatable, IValidatableObject
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected Dog() { }
+ protected Dog()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -45,6 +48,7 @@ protected Dog() { }
public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color)
{
this.Breed = breed;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -53,6 +57,12 @@ protected Dog() { }
[DataMember(Name = "breed", EmitDefaultValue = false)]
public string Breed { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -63,6 +73,7 @@ public override string ToString()
sb.Append("class Dog {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" Breed: ").Append(Breed).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -107,6 +118,8 @@ public override int GetHashCode()
int hashCode = base.GetHashCode();
if (this.Breed != null)
hashCode = hashCode * 59 + this.Breed.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/DogAllOf.cs
index 1ed12cc90419..b0090fa88c92 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/DogAllOf.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/DogAllOf.cs
@@ -38,6 +38,7 @@ public partial class DogAllOf : IEquatable, IValidatableObject
public DogAllOf(string breed = default(string))
{
this.Breed = breed;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class DogAllOf : IEquatable, IValidatableObject
[DataMember(Name = "breed", EmitDefaultValue = false)]
public string Breed { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class DogAllOf {\n");
sb.Append(" Breed: ").Append(Breed).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -99,6 +107,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.Breed != null)
hashCode = hashCode * 59 + this.Breed.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs
index 303638b9e7b5..38f24381c450 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs
@@ -91,8 +91,15 @@ public enum ArrayEnumEnum
{
this.JustSymbol = justSymbol;
this.ArrayEnum = arrayEnum;
+ this.AdditionalProperties = new Dictionary();
}
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -103,6 +110,7 @@ public override string ToString()
sb.Append("class EnumArrays {\n");
sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n");
sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -147,6 +155,8 @@ public override int GetHashCode()
int hashCode = 41;
hashCode = hashCode * 59 + this.JustSymbol.GetHashCode();
hashCode = hashCode * 59 + this.ArrayEnum.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs
index 6adf138cebb7..d9576b09a9f1 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs
@@ -164,7 +164,10 @@ public enum EnumNumberEnum
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected EnumTest() { }
+ protected EnumTest()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -186,8 +189,15 @@ protected EnumTest() { }
this.OuterEnumInteger = outerEnumInteger;
this.OuterEnumDefaultValue = outerEnumDefaultValue;
this.OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
+ this.AdditionalProperties = new Dictionary();
}
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -204,6 +214,7 @@ public override string ToString()
sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n");
sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n");
sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -254,6 +265,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.OuterEnumInteger.GetHashCode();
hashCode = hashCode * 59 + this.OuterEnumDefaultValue.GetHashCode();
hashCode = hashCode * 59 + this.OuterEnumIntegerDefaultValue.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs
index 2506f3fcc05d..58cf7206c5e1 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs
@@ -38,6 +38,7 @@ public partial class File : IEquatable, IValidatableObject
public File(string sourceURI = default(string))
{
this.SourceURI = sourceURI;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -47,6 +48,12 @@ public partial class File : IEquatable, IValidatableObject
[DataMember(Name = "sourceURI", EmitDefaultValue = false)]
public string SourceURI { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -56,6 +63,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class File {\n");
sb.Append(" SourceURI: ").Append(SourceURI).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -100,6 +108,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.SourceURI != null)
hashCode = hashCode * 59 + this.SourceURI.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
index a9fd3ee15419..7b171faf1f21 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
@@ -40,6 +40,7 @@ public partial class FileSchemaTestClass : IEquatable, IVal
{
this.File = file;
this.Files = files;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -54,6 +55,12 @@ public partial class FileSchemaTestClass : IEquatable, IVal
[DataMember(Name = "files", EmitDefaultValue = false)]
public List Files { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -64,6 +71,7 @@ public override string ToString()
sb.Append("class FileSchemaTestClass {\n");
sb.Append(" File: ").Append(File).Append("\n");
sb.Append(" Files: ").Append(Files).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -110,6 +118,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.File.GetHashCode();
if (this.Files != null)
hashCode = hashCode * 59 + this.Files.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Foo.cs
index 5b3c0a2dbd17..840f083d3e3f 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Foo.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Foo.cs
@@ -39,6 +39,7 @@ public Foo(string bar = "bar")
{
// use default value if no "bar" provided
this.Bar = bar ?? "bar";
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -47,6 +48,12 @@ public Foo(string bar = "bar")
[DataMember(Name = "bar", EmitDefaultValue = false)]
public string Bar { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -56,6 +63,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class Foo {\n");
sb.Append(" Bar: ").Append(Bar).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -100,6 +108,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.Bar != null)
hashCode = hashCode * 59 + this.Bar.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs
index b9b836c20261..cc97b2ee568e 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -35,7 +35,10 @@ public partial class FormatTest : IEquatable, IValidatableObject
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected FormatTest() { }
+ protected FormatTest()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -73,6 +76,7 @@ protected FormatTest() { }
this.Uuid = uuid;
this.PatternWithDigits = patternWithDigits;
this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -168,6 +172,12 @@ protected FormatTest() { }
[DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)]
public string PatternWithDigitsAndDelimiter { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -191,6 +201,7 @@ public override string ToString()
sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -257,6 +268,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.PatternWithDigits.GetHashCode();
if (this.PatternWithDigitsAndDelimiter != null)
hashCode = hashCode * 59 + this.PatternWithDigitsAndDelimiter.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
index d50bb270d7ab..393c368c48ab 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
@@ -37,6 +37,7 @@ public partial class HasOnlyReadOnly : IEquatable, IValidatable
[JsonConstructorAttribute]
public HasOnlyReadOnly()
{
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -51,6 +52,12 @@ public HasOnlyReadOnly()
[DataMember(Name = "foo", EmitDefaultValue = false)]
public string Foo { get; private set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -61,6 +68,7 @@ public override string ToString()
sb.Append("class HasOnlyReadOnly {\n");
sb.Append(" Bar: ").Append(Bar).Append("\n");
sb.Append(" Foo: ").Append(Foo).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -107,6 +115,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Bar.GetHashCode();
if (this.Foo != null)
hashCode = hashCode * 59 + this.Foo.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/HealthCheckResult.cs
index 7207eebef1b9..ad2dca66f64c 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/HealthCheckResult.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/HealthCheckResult.cs
@@ -38,6 +38,7 @@ public partial class HealthCheckResult : IEquatable, IValidat
public HealthCheckResult(string nullableMessage = default(string))
{
this.NullableMessage = nullableMessage;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class HealthCheckResult : IEquatable, IValidat
[DataMember(Name = "NullableMessage", EmitDefaultValue = true)]
public string NullableMessage { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class HealthCheckResult {\n");
sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -99,6 +107,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.NullableMessage != null)
hashCode = hashCode * 59 + this.NullableMessage.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject.cs
index 066f6b1440a8..780185519bfa 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject.cs
@@ -40,6 +40,7 @@ public partial class InlineObject : IEquatable, IValidatableObject
{
this.Name = name;
this.Status = status;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -56,6 +57,12 @@ public partial class InlineObject : IEquatable, IValidatableObject
[DataMember(Name = "status", EmitDefaultValue = false)]
public string Status { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -66,6 +73,7 @@ public override string ToString()
sb.Append("class InlineObject {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -112,6 +120,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Name.GetHashCode();
if (this.Status != null)
hashCode = hashCode * 59 + this.Status.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject1.cs
index 67f66d3b74bb..3ef70aa5ab29 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject1.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject1.cs
@@ -40,6 +40,7 @@ public partial class InlineObject1 : IEquatable, IValidatableObje
{
this.AdditionalMetadata = additionalMetadata;
this.File = file;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -56,6 +57,12 @@ public partial class InlineObject1 : IEquatable, IValidatableObje
[DataMember(Name = "file", EmitDefaultValue = false)]
public System.IO.Stream File { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -66,6 +73,7 @@ public override string ToString()
sb.Append("class InlineObject1 {\n");
sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n");
sb.Append(" File: ").Append(File).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -112,6 +120,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode();
if (this.File != null)
hashCode = hashCode * 59 + this.File.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject2.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject2.cs
index 53ccb46c383f..7d73efc1f9fd 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject2.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject2.cs
@@ -100,8 +100,15 @@ public enum EnumFormStringEnum
{
this.EnumFormStringArray = enumFormStringArray;
this.EnumFormString = enumFormString;
+ this.AdditionalProperties = new Dictionary();
}
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -112,6 +119,7 @@ public override string ToString()
sb.Append("class InlineObject2 {\n");
sb.Append(" EnumFormStringArray: ").Append(EnumFormStringArray).Append("\n");
sb.Append(" EnumFormString: ").Append(EnumFormString).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -156,6 +164,8 @@ public override int GetHashCode()
int hashCode = 41;
hashCode = hashCode * 59 + this.EnumFormStringArray.GetHashCode();
hashCode = hashCode * 59 + this.EnumFormString.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject3.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject3.cs
index 6e3d21e76185..4b0e02ecf9be 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject3.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject3.cs
@@ -35,7 +35,10 @@ public partial class InlineObject3 : IEquatable, IValidatableObje
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected InlineObject3() { }
+ protected InlineObject3()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -71,6 +74,7 @@ protected InlineObject3() { }
this.DateTime = dateTime;
this.Password = password;
this.Callback = callback;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -172,6 +176,12 @@ protected InlineObject3() { }
[DataMember(Name = "callback", EmitDefaultValue = false)]
public string Callback { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -194,6 +204,7 @@ public override string ToString()
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append(" Callback: ").Append(Callback).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -258,6 +269,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Password.GetHashCode();
if (this.Callback != null)
hashCode = hashCode * 59 + this.Callback.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject4.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject4.cs
index e86c6e2521c9..c89ac96f6136 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject4.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject4.cs
@@ -35,7 +35,10 @@ public partial class InlineObject4 : IEquatable, IValidatableObje
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected InlineObject4() { }
+ protected InlineObject4()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -47,6 +50,7 @@ protected InlineObject4() { }
this.Param = param ?? throw new ArgumentNullException("param is a required property for InlineObject4 and cannot be null");
// to ensure "param2" is required (not null)
this.Param2 = param2 ?? throw new ArgumentNullException("param2 is a required property for InlineObject4 and cannot be null");
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -63,6 +67,12 @@ protected InlineObject4() { }
[DataMember(Name = "param2", EmitDefaultValue = false)]
public string Param2 { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -73,6 +83,7 @@ public override string ToString()
sb.Append("class InlineObject4 {\n");
sb.Append(" Param: ").Append(Param).Append("\n");
sb.Append(" Param2: ").Append(Param2).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -119,6 +130,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Param.GetHashCode();
if (this.Param2 != null)
hashCode = hashCode * 59 + this.Param2.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject5.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject5.cs
index 8a54c118a94d..a0890701fdf4 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject5.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject5.cs
@@ -35,7 +35,10 @@ public partial class InlineObject5 : IEquatable, IValidatableObje
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected InlineObject5() { }
+ protected InlineObject5()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -46,6 +49,7 @@ protected InlineObject5() { }
// to ensure "requiredFile" is required (not null)
this.RequiredFile = requiredFile ?? throw new ArgumentNullException("requiredFile is a required property for InlineObject5 and cannot be null");
this.AdditionalMetadata = additionalMetadata;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -62,6 +66,12 @@ protected InlineObject5() { }
[DataMember(Name = "requiredFile", EmitDefaultValue = false)]
public System.IO.Stream RequiredFile { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -72,6 +82,7 @@ public override string ToString()
sb.Append("class InlineObject5 {\n");
sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n");
sb.Append(" RequiredFile: ").Append(RequiredFile).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -118,6 +129,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode();
if (this.RequiredFile != null)
hashCode = hashCode * 59 + this.RequiredFile.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineResponseDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineResponseDefault.cs
index 90658d9ee075..22fb6f061ef0 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineResponseDefault.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/InlineResponseDefault.cs
@@ -38,6 +38,7 @@ public partial class InlineResponseDefault : IEquatable,
public InlineResponseDefault(Foo _string = default(Foo))
{
this.String = _string;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class InlineResponseDefault : IEquatable,
[DataMember(Name = "string", EmitDefaultValue = false)]
public Foo String { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class InlineResponseDefault {\n");
sb.Append(" String: ").Append(String).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -99,6 +107,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.String != null)
hashCode = hashCode * 59 + this.String.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/List.cs
index 08726324fe4d..5acef9a2037f 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/List.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/List.cs
@@ -38,6 +38,7 @@ public partial class List : IEquatable, IValidatableObject
public List(string _123list = default(string))
{
this._123List = _123list;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class List : IEquatable, IValidatableObject
[DataMember(Name = "123-list", EmitDefaultValue = false)]
public string _123List { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class List {\n");
sb.Append(" _123List: ").Append(_123List).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -99,6 +107,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this._123List != null)
hashCode = hashCode * 59 + this._123List.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs
index 83fb41cc023c..31f6e37b6411 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs
@@ -70,6 +70,7 @@ public enum InnerEnum
this.MapOfEnumString = mapOfEnumString;
this.DirectMap = directMap;
this.IndirectMap = indirectMap;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -90,6 +91,12 @@ public enum InnerEnum
[DataMember(Name = "indirect_map", EmitDefaultValue = false)]
public Dictionary IndirectMap { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -102,6 +109,7 @@ public override string ToString()
sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n");
sb.Append(" DirectMap: ").Append(DirectMap).Append("\n");
sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -151,6 +159,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.DirectMap.GetHashCode();
if (this.IndirectMap != null)
hashCode = hashCode * 59 + this.IndirectMap.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
index 2d07c103683d..1cefa4f96886 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
@@ -42,6 +42,7 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable();
}
///
@@ -62,6 +63,12 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable Map { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -73,6 +80,7 @@ public override string ToString()
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append(" Map: ").Append(Map).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -121,6 +129,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.DateTime.GetHashCode();
if (this.Map != null)
hashCode = hashCode * 59 + this.Map.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs
index bb2df767af18..5cdf53a7fff1 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs
@@ -40,6 +40,7 @@ public partial class Model200Response : IEquatable, IValidatab
{
this.Name = name;
this.Class = _class;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -54,6 +55,12 @@ public partial class Model200Response : IEquatable, IValidatab
[DataMember(Name = "class", EmitDefaultValue = false)]
public string Class { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -64,6 +71,7 @@ public override string ToString()
sb.Append("class Model200Response {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" Class: ").Append(Class).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -109,6 +117,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Name.GetHashCode();
if (this.Class != null)
hashCode = hashCode * 59 + this.Class.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ModelClient.cs
index 62eaa7e2d841..e0b44ec83ec8 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ModelClient.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ModelClient.cs
@@ -38,6 +38,7 @@ public partial class ModelClient : IEquatable, IValidatableObject
public ModelClient(string _client = default(string))
{
this.__Client = _client;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class ModelClient : IEquatable, IValidatableObject
[DataMember(Name = "client", EmitDefaultValue = false)]
public string __Client { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class ModelClient {\n");
sb.Append(" __Client: ").Append(__Client).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -99,6 +107,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.__Client != null)
hashCode = hashCode * 59 + this.__Client.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs
index 04c5cadbcf9c..45009b6ff007 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs
@@ -35,7 +35,10 @@ public partial class Name : IEquatable, IValidatableObject
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected Name() { }
+ protected Name()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -45,6 +48,7 @@ protected Name() { }
{
this._Name = name;
this.Property = property;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -71,6 +75,12 @@ protected Name() { }
[DataMember(Name = "123Number", EmitDefaultValue = false)]
public int _123Number { get; private set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -83,6 +93,7 @@ public override string ToString()
sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n");
sb.Append(" Property: ").Append(Property).Append("\n");
sb.Append(" _123Number: ").Append(_123Number).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -130,6 +141,8 @@ public override int GetHashCode()
if (this.Property != null)
hashCode = hashCode * 59 + this.Property.GetHashCode();
hashCode = hashCode * 59 + this._123Number.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs
index 8b1aeccff9ca..60715977fc19 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs
@@ -38,6 +38,7 @@ public partial class NumberOnly : IEquatable, IValidatableObject
public NumberOnly(decimal justNumber = default(decimal))
{
this.JustNumber = justNumber;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class NumberOnly : IEquatable, IValidatableObject
[DataMember(Name = "JustNumber", EmitDefaultValue = false)]
public decimal JustNumber { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class NumberOnly {\n");
sb.Append(" JustNumber: ").Append(JustNumber).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -98,6 +106,8 @@ public override int GetHashCode()
{
int hashCode = 41;
hashCode = hashCode * 59 + this.JustNumber.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs
index 46fdacf2c261..2f8576883994 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs
@@ -81,6 +81,7 @@ public enum StatusEnum
this.ShipDate = shipDate;
this.Status = status;
this.Complete = complete;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -113,6 +114,12 @@ public enum StatusEnum
[DataMember(Name = "complete", EmitDefaultValue = false)]
public bool Complete { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -127,6 +134,7 @@ public override string ToString()
sb.Append(" ShipDate: ").Append(ShipDate).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append(" Complete: ").Append(Complete).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -176,6 +184,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.ShipDate.GetHashCode();
hashCode = hashCode * 59 + this.Status.GetHashCode();
hashCode = hashCode * 59 + this.Complete.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs
index da99d557f0f8..4a045b7d3a46 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs
@@ -42,6 +42,7 @@ public partial class OuterComposite : IEquatable, IValidatableOb
this.MyNumber = myNumber;
this.MyString = myString;
this.MyBoolean = myBoolean;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -62,6 +63,12 @@ public partial class OuterComposite : IEquatable, IValidatableOb
[DataMember(Name = "my_boolean", EmitDefaultValue = false)]
public bool MyBoolean { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -73,6 +80,7 @@ public override string ToString()
sb.Append(" MyNumber: ").Append(MyNumber).Append("\n");
sb.Append(" MyString: ").Append(MyString).Append("\n");
sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -119,6 +127,8 @@ public override int GetHashCode()
if (this.MyString != null)
hashCode = hashCode * 59 + this.MyString.GetHashCode();
hashCode = hashCode * 59 + this.MyBoolean.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs
index 1b23c5a56995..3d4c5d0bd169 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs
@@ -68,7 +68,10 @@ public enum StatusEnum
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected Pet() { }
+ protected Pet()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -88,6 +91,7 @@ protected Pet() { }
this.Category = category;
this.Tags = tags;
this.Status = status;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -120,6 +124,12 @@ protected Pet() { }
[DataMember(Name = "tags", EmitDefaultValue = false)]
public List Tags { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -134,6 +144,7 @@ public override string ToString()
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
sb.Append(" Tags: ").Append(Tags).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -186,6 +197,8 @@ public override int GetHashCode()
if (this.Tags != null)
hashCode = hashCode * 59 + this.Tags.GetHashCode();
hashCode = hashCode * 59 + this.Status.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
index 3f92367c6a50..266b65c27963 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
@@ -38,6 +38,7 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje
public ReadOnlyFirst(string baz = default(string))
{
this.Baz = baz;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -52,6 +53,12 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje
[DataMember(Name = "baz", EmitDefaultValue = false)]
public string Baz { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -62,6 +69,7 @@ public override string ToString()
sb.Append("class ReadOnlyFirst {\n");
sb.Append(" Bar: ").Append(Bar).Append("\n");
sb.Append(" Baz: ").Append(Baz).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -108,6 +116,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Bar.GetHashCode();
if (this.Baz != null)
hashCode = hashCode * 59 + this.Baz.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs
index a88f522a26b8..eb2042fd6572 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs
@@ -38,6 +38,7 @@ public partial class Return : IEquatable, IValidatableObject
public Return(int _return = default(int))
{
this._Return = _return;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class Return : IEquatable, IValidatableObject
[DataMember(Name = "return", EmitDefaultValue = false)]
public int _Return { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class Return {\n");
sb.Append(" _Return: ").Append(_Return).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -98,6 +106,8 @@ public override int GetHashCode()
{
int hashCode = 41;
hashCode = hashCode * 59 + this._Return.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs
index 4898e79a4580..5d59e568149e 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs
@@ -38,6 +38,7 @@ public partial class SpecialModelName : IEquatable, IValidatab
public SpecialModelName(long specialPropertyName = default(long))
{
this.SpecialPropertyName = specialPropertyName;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -46,6 +47,12 @@ public partial class SpecialModelName : IEquatable, IValidatab
[DataMember(Name = "$special[property.name]", EmitDefaultValue = false)]
public long SpecialPropertyName { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -55,6 +62,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class SpecialModelName {\n");
sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -98,6 +106,8 @@ public override int GetHashCode()
{
int hashCode = 41;
hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs
deleted file mode 100644
index 65457a6ece88..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * OpenAPI Petstore
- *
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * OpenAPI spec version: 1.0.0
- *
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using System;
-using System.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// StringBooleanMap
- ///
- [DataContract]
- public partial class StringBooleanMap : Dictionary, IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- public StringBooleanMap() : base()
- {
- }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class StringBooleanMap {\n");
- sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public string ToJson()
- {
- return JsonConvert.SerializeObject(this, Formatting.Indented);
- }
-
- ///
- /// Returns true if objects are equal
- ///
- /// Object to be compared
- /// Boolean
- public override bool Equals(object input)
- {
- return this.Equals(input as StringBooleanMap);
- }
-
- ///
- /// Returns true if StringBooleanMap instances are equal
- ///
- /// Instance of StringBooleanMap to be compared
- /// Boolean
- public bool Equals(StringBooleanMap input)
- {
- if (input == null)
- return false;
-
- return base.Equals(input);
- }
-
- ///
- /// Gets the hash code
- ///
- /// Hash code
- public override int GetHashCode()
- {
- unchecked // Overflow is fine, just wrap
- {
- int hashCode = base.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs
index 1fbde976e396..cf8aa3667219 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs
@@ -40,6 +40,7 @@ public partial class Tag : IEquatable, IValidatableObject
{
this.Id = id;
this.Name = name;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -54,6 +55,12 @@ public partial class Tag : IEquatable, IValidatableObject
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -64,6 +71,7 @@ public override string ToString()
sb.Append("class Tag {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -109,6 +117,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs
deleted file mode 100644
index c7034a2edda5..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// TypeHolderDefault
- ///
- [DataContract]
- public partial class TypeHolderDefault : IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- protected TypeHolderDefault() { }
- ///
- /// Initializes a new instance of the class.
- ///
- /// stringItem (required) (default to "what").
- /// numberItem (required).
- /// integerItem (required).
- /// boolItem (required) (default to true).
- /// arrayItem (required).
- public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List))
- {
- // to ensure "stringItem" is required (not null)
- this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderDefault and cannot be null");
- this.NumberItem = numberItem;
- this.IntegerItem = integerItem;
- this.BoolItem = boolItem;
- // to ensure "arrayItem" is required (not null)
- this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderDefault and cannot be null");
- }
-
- ///
- /// Gets or Sets StringItem
- ///
- [DataMember(Name="string_item", EmitDefaultValue=false)]
- public string StringItem { get; set; }
-
- ///
- /// Gets or Sets NumberItem
- ///
- [DataMember(Name="number_item", EmitDefaultValue=false)]
- public decimal NumberItem { get; set; }
-
- ///
- /// Gets or Sets IntegerItem
- ///
- [DataMember(Name="integer_item", EmitDefaultValue=false)]
- public int IntegerItem { get; set; }
-
- ///
- /// Gets or Sets BoolItem
- ///
- [DataMember(Name="bool_item", EmitDefaultValue=false)]
- public bool BoolItem { get; set; }
-
- ///
- /// Gets or Sets ArrayItem
- ///
- [DataMember(Name="array_item", EmitDefaultValue=false)]
- public List ArrayItem { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class TypeHolderDefault {\n");
- sb.Append(" StringItem: ").Append(StringItem).Append("\n");
- sb.Append(" NumberItem: ").Append(NumberItem).Append("\n");
- sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n");
- sb.Append(" BoolItem: ").Append(BoolItem).Append("\n");
- sb.Append(" ArrayItem: ").Append(ArrayItem).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 JsonConvert.SerializeObject(this, 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 TypeHolderDefault).AreEqual;
- }
-
- ///
- /// Returns true if TypeHolderDefault instances are equal
- ///
- /// Instance of TypeHolderDefault to be compared
- /// Boolean
- public bool Equals(TypeHolderDefault 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.StringItem != null)
- hashCode = hashCode * 59 + this.StringItem.GetHashCode();
- hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
- hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
- hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
- if (this.ArrayItem != null)
- hashCode = hashCode * 59 + this.ArrayItem.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs
deleted file mode 100644
index e69ce97ac715..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// TypeHolderExample
- ///
- [DataContract]
- public partial class TypeHolderExample : IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- protected TypeHolderExample() { }
- ///
- /// Initializes a new instance of the class.
- ///
- /// stringItem (required).
- /// numberItem (required).
- /// floatItem (required).
- /// integerItem (required).
- /// boolItem (required).
- /// arrayItem (required).
- public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List))
- {
- // to ensure "stringItem" is required (not null)
- this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderExample and cannot be null");
- this.NumberItem = numberItem;
- this.FloatItem = floatItem;
- this.IntegerItem = integerItem;
- this.BoolItem = boolItem;
- // to ensure "arrayItem" is required (not null)
- this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderExample and cannot be null");
- }
-
- ///
- /// Gets or Sets StringItem
- ///
- [DataMember(Name="string_item", EmitDefaultValue=false)]
- public string StringItem { get; set; }
-
- ///
- /// Gets or Sets NumberItem
- ///
- [DataMember(Name="number_item", EmitDefaultValue=false)]
- public decimal NumberItem { get; set; }
-
- ///
- /// Gets or Sets FloatItem
- ///
- [DataMember(Name="float_item", EmitDefaultValue=false)]
- public float FloatItem { get; set; }
-
- ///
- /// Gets or Sets IntegerItem
- ///
- [DataMember(Name="integer_item", EmitDefaultValue=false)]
- public int IntegerItem { get; set; }
-
- ///
- /// Gets or Sets BoolItem
- ///
- [DataMember(Name="bool_item", EmitDefaultValue=false)]
- public bool BoolItem { get; set; }
-
- ///
- /// Gets or Sets ArrayItem
- ///
- [DataMember(Name="array_item", EmitDefaultValue=false)]
- public List ArrayItem { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class TypeHolderExample {\n");
- sb.Append(" StringItem: ").Append(StringItem).Append("\n");
- sb.Append(" NumberItem: ").Append(NumberItem).Append("\n");
- sb.Append(" FloatItem: ").Append(FloatItem).Append("\n");
- sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n");
- sb.Append(" BoolItem: ").Append(BoolItem).Append("\n");
- sb.Append(" ArrayItem: ").Append(ArrayItem).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 JsonConvert.SerializeObject(this, 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 TypeHolderExample).AreEqual;
- }
-
- ///
- /// Returns true if TypeHolderExample instances are equal
- ///
- /// Instance of TypeHolderExample to be compared
- /// Boolean
- public bool Equals(TypeHolderExample 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.StringItem != null)
- hashCode = hashCode * 59 + this.StringItem.GetHashCode();
- hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
- hashCode = hashCode * 59 + this.FloatItem.GetHashCode();
- hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
- hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
- if (this.ArrayItem != null)
- hashCode = hashCode * 59 + this.ArrayItem.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs
index 8b6ee8d2d479..cc92d4884803 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs
@@ -52,6 +52,7 @@ public partial class User : IEquatable, IValidatableObject
this.Password = password;
this.Phone = phone;
this.UserStatus = userStatus;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -103,6 +104,12 @@ public partial class User : IEquatable, IValidatableObject
[DataMember(Name = "userStatus", EmitDefaultValue = false)]
public int UserStatus { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -119,6 +126,7 @@ public override string ToString()
sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append(" Phone: ").Append(Phone).Append("\n");
sb.Append(" UserStatus: ").Append(UserStatus).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -175,6 +183,8 @@ public override int GetHashCode()
if (this.Phone != null)
hashCode = hashCode * 59 + this.Phone.GetHashCode();
hashCode = hashCode * 59 + this.UserStatus.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/XmlItem.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/XmlItem.cs
deleted file mode 100644
index 8f204d8814f6..000000000000
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/XmlItem.cs
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * 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.Linq;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.Serialization;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
-using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
-
-namespace Org.OpenAPITools.Model
-{
- ///
- /// XmlItem
- ///
- [DataContract]
- public partial class XmlItem : IEquatable, IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// attributeString.
- /// attributeNumber.
- /// attributeInteger.
- /// attributeBoolean.
- /// wrappedArray.
- /// nameString.
- /// nameNumber.
- /// nameInteger.
- /// nameBoolean.
- /// nameArray.
- /// nameWrappedArray.
- /// prefixString.
- /// prefixNumber.
- /// prefixInteger.
- /// prefixBoolean.
- /// prefixArray.
- /// prefixWrappedArray.
- /// namespaceString.
- /// namespaceNumber.
- /// namespaceInteger.
- /// namespaceBoolean.
- /// namespaceArray.
- /// namespaceWrappedArray.
- /// prefixNsString.
- /// prefixNsNumber.
- /// prefixNsInteger.
- /// prefixNsBoolean.
- /// prefixNsArray.
- /// prefixNsWrappedArray.
- public XmlItem(string attributeString = default(string), decimal attributeNumber = default(decimal), int attributeInteger = default(int), bool attributeBoolean = default(bool), List wrappedArray = default(List), string nameString = default(string), decimal nameNumber = default(decimal), int nameInteger = default(int), bool nameBoolean = default(bool), List nameArray = default(List), List nameWrappedArray = default(List), string prefixString = default(string), decimal prefixNumber = default(decimal), int prefixInteger = default(int), bool prefixBoolean = default(bool), List prefixArray = default(List), List prefixWrappedArray = default(List), string namespaceString = default(string), decimal namespaceNumber = default(decimal), int namespaceInteger = default(int), bool namespaceBoolean = default(bool), List namespaceArray = default(List), List namespaceWrappedArray = default(List), string prefixNsString = default(string), decimal prefixNsNumber = default(decimal), int prefixNsInteger = default(int), bool prefixNsBoolean = default(bool), List prefixNsArray = default(List), List prefixNsWrappedArray = default(List))
- {
- this.AttributeString = attributeString;
- this.AttributeNumber = attributeNumber;
- this.AttributeInteger = attributeInteger;
- this.AttributeBoolean = attributeBoolean;
- this.WrappedArray = wrappedArray;
- this.NameString = nameString;
- this.NameNumber = nameNumber;
- this.NameInteger = nameInteger;
- this.NameBoolean = nameBoolean;
- this.NameArray = nameArray;
- this.NameWrappedArray = nameWrappedArray;
- this.PrefixString = prefixString;
- this.PrefixNumber = prefixNumber;
- this.PrefixInteger = prefixInteger;
- this.PrefixBoolean = prefixBoolean;
- this.PrefixArray = prefixArray;
- this.PrefixWrappedArray = prefixWrappedArray;
- this.NamespaceString = namespaceString;
- this.NamespaceNumber = namespaceNumber;
- this.NamespaceInteger = namespaceInteger;
- this.NamespaceBoolean = namespaceBoolean;
- this.NamespaceArray = namespaceArray;
- this.NamespaceWrappedArray = namespaceWrappedArray;
- this.PrefixNsString = prefixNsString;
- this.PrefixNsNumber = prefixNsNumber;
- this.PrefixNsInteger = prefixNsInteger;
- this.PrefixNsBoolean = prefixNsBoolean;
- this.PrefixNsArray = prefixNsArray;
- this.PrefixNsWrappedArray = prefixNsWrappedArray;
- }
-
- ///
- /// Gets or Sets AttributeString
- ///
- [DataMember(Name="attribute_string", EmitDefaultValue=false)]
- public string AttributeString { get; set; }
-
- ///
- /// Gets or Sets AttributeNumber
- ///
- [DataMember(Name="attribute_number", EmitDefaultValue=false)]
- public decimal AttributeNumber { get; set; }
-
- ///
- /// Gets or Sets AttributeInteger
- ///
- [DataMember(Name="attribute_integer", EmitDefaultValue=false)]
- public int AttributeInteger { get; set; }
-
- ///
- /// Gets or Sets AttributeBoolean
- ///
- [DataMember(Name="attribute_boolean", EmitDefaultValue=false)]
- public bool AttributeBoolean { get; set; }
-
- ///
- /// Gets or Sets WrappedArray
- ///
- [DataMember(Name="wrapped_array", EmitDefaultValue=false)]
- public List WrappedArray { get; set; }
-
- ///
- /// Gets or Sets NameString
- ///
- [DataMember(Name="name_string", EmitDefaultValue=false)]
- public string NameString { get; set; }
-
- ///
- /// Gets or Sets NameNumber
- ///
- [DataMember(Name="name_number", EmitDefaultValue=false)]
- public decimal NameNumber { get; set; }
-
- ///
- /// Gets or Sets NameInteger
- ///
- [DataMember(Name="name_integer", EmitDefaultValue=false)]
- public int NameInteger { get; set; }
-
- ///
- /// Gets or Sets NameBoolean
- ///
- [DataMember(Name="name_boolean", EmitDefaultValue=false)]
- public bool NameBoolean { get; set; }
-
- ///
- /// Gets or Sets NameArray
- ///
- [DataMember(Name="name_array", EmitDefaultValue=false)]
- public List NameArray { get; set; }
-
- ///
- /// Gets or Sets NameWrappedArray
- ///
- [DataMember(Name="name_wrapped_array", EmitDefaultValue=false)]
- public List NameWrappedArray { get; set; }
-
- ///
- /// Gets or Sets PrefixString
- ///
- [DataMember(Name="prefix_string", EmitDefaultValue=false)]
- public string PrefixString { get; set; }
-
- ///
- /// Gets or Sets PrefixNumber
- ///
- [DataMember(Name="prefix_number", EmitDefaultValue=false)]
- public decimal PrefixNumber { get; set; }
-
- ///
- /// Gets or Sets PrefixInteger
- ///
- [DataMember(Name="prefix_integer", EmitDefaultValue=false)]
- public int PrefixInteger { get; set; }
-
- ///
- /// Gets or Sets PrefixBoolean
- ///
- [DataMember(Name="prefix_boolean", EmitDefaultValue=false)]
- public bool PrefixBoolean { get; set; }
-
- ///
- /// Gets or Sets PrefixArray
- ///
- [DataMember(Name="prefix_array", EmitDefaultValue=false)]
- public List PrefixArray { get; set; }
-
- ///
- /// Gets or Sets PrefixWrappedArray
- ///
- [DataMember(Name="prefix_wrapped_array", EmitDefaultValue=false)]
- public List PrefixWrappedArray { get; set; }
-
- ///
- /// Gets or Sets NamespaceString
- ///
- [DataMember(Name="namespace_string", EmitDefaultValue=false)]
- public string NamespaceString { get; set; }
-
- ///
- /// Gets or Sets NamespaceNumber
- ///
- [DataMember(Name="namespace_number", EmitDefaultValue=false)]
- public decimal NamespaceNumber { get; set; }
-
- ///
- /// Gets or Sets NamespaceInteger
- ///
- [DataMember(Name="namespace_integer", EmitDefaultValue=false)]
- public int NamespaceInteger { get; set; }
-
- ///
- /// Gets or Sets NamespaceBoolean
- ///
- [DataMember(Name="namespace_boolean", EmitDefaultValue=false)]
- public bool NamespaceBoolean { get; set; }
-
- ///
- /// Gets or Sets NamespaceArray
- ///
- [DataMember(Name="namespace_array", EmitDefaultValue=false)]
- public List NamespaceArray { get; set; }
-
- ///
- /// Gets or Sets NamespaceWrappedArray
- ///
- [DataMember(Name="namespace_wrapped_array", EmitDefaultValue=false)]
- public List NamespaceWrappedArray { get; set; }
-
- ///
- /// Gets or Sets PrefixNsString
- ///
- [DataMember(Name="prefix_ns_string", EmitDefaultValue=false)]
- public string PrefixNsString { get; set; }
-
- ///
- /// Gets or Sets PrefixNsNumber
- ///
- [DataMember(Name="prefix_ns_number", EmitDefaultValue=false)]
- public decimal PrefixNsNumber { get; set; }
-
- ///
- /// Gets or Sets PrefixNsInteger
- ///
- [DataMember(Name="prefix_ns_integer", EmitDefaultValue=false)]
- public int PrefixNsInteger { get; set; }
-
- ///
- /// Gets or Sets PrefixNsBoolean
- ///
- [DataMember(Name="prefix_ns_boolean", EmitDefaultValue=false)]
- public bool PrefixNsBoolean { get; set; }
-
- ///
- /// Gets or Sets PrefixNsArray
- ///
- [DataMember(Name="prefix_ns_array", EmitDefaultValue=false)]
- public List PrefixNsArray { get; set; }
-
- ///
- /// Gets or Sets PrefixNsWrappedArray
- ///
- [DataMember(Name="prefix_ns_wrapped_array", EmitDefaultValue=false)]
- public List PrefixNsWrappedArray { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class XmlItem {\n");
- sb.Append(" AttributeString: ").Append(AttributeString).Append("\n");
- sb.Append(" AttributeNumber: ").Append(AttributeNumber).Append("\n");
- sb.Append(" AttributeInteger: ").Append(AttributeInteger).Append("\n");
- sb.Append(" AttributeBoolean: ").Append(AttributeBoolean).Append("\n");
- sb.Append(" WrappedArray: ").Append(WrappedArray).Append("\n");
- sb.Append(" NameString: ").Append(NameString).Append("\n");
- sb.Append(" NameNumber: ").Append(NameNumber).Append("\n");
- sb.Append(" NameInteger: ").Append(NameInteger).Append("\n");
- sb.Append(" NameBoolean: ").Append(NameBoolean).Append("\n");
- sb.Append(" NameArray: ").Append(NameArray).Append("\n");
- sb.Append(" NameWrappedArray: ").Append(NameWrappedArray).Append("\n");
- sb.Append(" PrefixString: ").Append(PrefixString).Append("\n");
- sb.Append(" PrefixNumber: ").Append(PrefixNumber).Append("\n");
- sb.Append(" PrefixInteger: ").Append(PrefixInteger).Append("\n");
- sb.Append(" PrefixBoolean: ").Append(PrefixBoolean).Append("\n");
- sb.Append(" PrefixArray: ").Append(PrefixArray).Append("\n");
- sb.Append(" PrefixWrappedArray: ").Append(PrefixWrappedArray).Append("\n");
- sb.Append(" NamespaceString: ").Append(NamespaceString).Append("\n");
- sb.Append(" NamespaceNumber: ").Append(NamespaceNumber).Append("\n");
- sb.Append(" NamespaceInteger: ").Append(NamespaceInteger).Append("\n");
- sb.Append(" NamespaceBoolean: ").Append(NamespaceBoolean).Append("\n");
- sb.Append(" NamespaceArray: ").Append(NamespaceArray).Append("\n");
- sb.Append(" NamespaceWrappedArray: ").Append(NamespaceWrappedArray).Append("\n");
- sb.Append(" PrefixNsString: ").Append(PrefixNsString).Append("\n");
- sb.Append(" PrefixNsNumber: ").Append(PrefixNsNumber).Append("\n");
- sb.Append(" PrefixNsInteger: ").Append(PrefixNsInteger).Append("\n");
- sb.Append(" PrefixNsBoolean: ").Append(PrefixNsBoolean).Append("\n");
- sb.Append(" PrefixNsArray: ").Append(PrefixNsArray).Append("\n");
- sb.Append(" PrefixNsWrappedArray: ").Append(PrefixNsWrappedArray).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 JsonConvert.SerializeObject(this, 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 XmlItem).AreEqual;
- }
-
- ///
- /// Returns true if XmlItem instances are equal
- ///
- /// Instance of XmlItem to be compared
- /// Boolean
- public bool Equals(XmlItem 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.AttributeString != null)
- hashCode = hashCode * 59 + this.AttributeString.GetHashCode();
- hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode();
- hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode();
- hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode();
- if (this.WrappedArray != null)
- hashCode = hashCode * 59 + this.WrappedArray.GetHashCode();
- if (this.NameString != null)
- hashCode = hashCode * 59 + this.NameString.GetHashCode();
- hashCode = hashCode * 59 + this.NameNumber.GetHashCode();
- hashCode = hashCode * 59 + this.NameInteger.GetHashCode();
- hashCode = hashCode * 59 + this.NameBoolean.GetHashCode();
- if (this.NameArray != null)
- hashCode = hashCode * 59 + this.NameArray.GetHashCode();
- if (this.NameWrappedArray != null)
- hashCode = hashCode * 59 + this.NameWrappedArray.GetHashCode();
- if (this.PrefixString != null)
- hashCode = hashCode * 59 + this.PrefixString.GetHashCode();
- hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode();
- hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode();
- hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode();
- if (this.PrefixArray != null)
- hashCode = hashCode * 59 + this.PrefixArray.GetHashCode();
- if (this.PrefixWrappedArray != null)
- hashCode = hashCode * 59 + this.PrefixWrappedArray.GetHashCode();
- if (this.NamespaceString != null)
- hashCode = hashCode * 59 + this.NamespaceString.GetHashCode();
- hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode();
- hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode();
- hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode();
- if (this.NamespaceArray != null)
- hashCode = hashCode * 59 + this.NamespaceArray.GetHashCode();
- if (this.NamespaceWrappedArray != null)
- hashCode = hashCode * 59 + this.NamespaceWrappedArray.GetHashCode();
- if (this.PrefixNsString != null)
- hashCode = hashCode * 59 + this.PrefixNsString.GetHashCode();
- hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode();
- hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode();
- hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode();
- if (this.PrefixNsArray != null)
- hashCode = hashCode * 59 + this.PrefixNsArray.GetHashCode();
- if (this.PrefixNsWrappedArray != null)
- hashCode = hashCode * 59 + this.PrefixNsWrappedArray.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Zebra.cs
index dcc669f49d38..3c6a2ce878a2 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Zebra.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Zebra.cs
@@ -66,7 +66,10 @@ public enum TypeEnum
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected Zebra() { }
+ protected Zebra()
+ {
+ this.AdditionalProperties = new Dictionary();
+ }
///
/// Initializes a new instance of the class.
///
@@ -77,6 +80,7 @@ protected Zebra() { }
// to ensure "className" is required (not null)
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Zebra and cannot be null");
this.Type = type;
+ this.AdditionalProperties = new Dictionary();
}
///
@@ -85,6 +89,12 @@ protected Zebra() { }
[DataMember(Name = "className", EmitDefaultValue = false)]
public string ClassName { get; set; }
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -96,6 +106,7 @@ public override string ToString()
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" ClassName: ").Append(ClassName).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@@ -141,6 +152,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Type.GetHashCode();
if (this.ClassName != null)
hashCode = hashCode * 59 + this.ClassName.GetHashCode();
+ if (this.AdditionalProperties != null)
+ hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode();
return hashCode;
}
}