Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(csharp): Fixed JsonConverter for discriminators only appearing on base classes #19972

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ namespace {{modelPackage}}
[DataContract]
{{#discriminator}}
{{#useNewtonsoft}}
{{#mappedModels.size}}
[JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")]
{{/mappedModels.size}}
{{/useNewtonsoft}}
{{#useSwashbuckle}}
[SwaggerDiscriminator("{{{discriminatorName}}}")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
/// </summary>
[DataContract(Name = "{{{name}}}")]
{{#discriminator}}
{{#mappedModels.size}}
[JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")]
{{/mappedModels.size}}
{{#mappedModels}}
[JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")]
{{/mappedModels}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
[DataContract(Name = "{{{name}}}")]
{{^useUnityWebRequest}}
{{#discriminator}}
{{#mappedModels.size}}
[JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")]
{{/mappedModels.size}}
{{#mappedModels}}
[JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")]
{{/mappedModels}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
/// Cat
/// </summary>
[DataContract(Name = "Cat")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Cat : Animal, IEquatable<Cat>, IValidatableObject
{
/// <summary>
Expand Down Expand Up @@ -65,7 +64,7 @@
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }

Check warning on line 67 in samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/httpclient/standard2.0/Petstore/)

'Cat.AdditionalProperties' hides inherited member 'Animal.AdditionalProperties'. Use the new keyword if hiding was intended.

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -144,7 +143,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 146 in samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/httpclient/standard2.0/Petstore/)

'Cat.BaseValidate(ValidationContext)' hides inherited member 'Animal.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
/// ChildCat
/// </summary>
[DataContract(Name = "ChildCat")]
[JsonConverter(typeof(JsonSubtypes), "PetType")]
public partial class ChildCat : ParentPet, IEquatable<ChildCat>, IValidatableObject
{
/// <summary>
Expand All @@ -53,7 +52,7 @@
/// Gets or Sets PetType
/// </summary>
[DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = true)]
public PetTypeEnum PetType { get; set; }

Check warning on line 55 in samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/httpclient/standard2.0/Petstore/)

'ChildCat.PetType' hides inherited member 'GrandparentAnimal.PetType'. Use the new keyword if hiding was intended.
/// <summary>
/// Initializes a new instance of the <see cref="ChildCat" /> class.
/// </summary>
Expand Down Expand Up @@ -84,7 +83,7 @@
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }

Check warning on line 86 in samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/httpclient/standard2.0/Petstore/)

'ChildCat.AdditionalProperties' hides inherited member 'ParentPet.AdditionalProperties'. Use the new keyword if hiding was intended.

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -168,7 +167,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 170 in samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/httpclient/standard2.0/Petstore/)

'ChildCat.BaseValidate(ValidationContext)' hides inherited member 'ParentPet.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
/// Dog
/// </summary>
[DataContract(Name = "Dog")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Dog : Animal, IEquatable<Dog>, IValidatableObject
{
/// <summary>
Expand Down Expand Up @@ -65,7 +64,7 @@
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }

Check warning on line 67 in samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/httpclient/standard2.0/Petstore/)

'Dog.AdditionalProperties' hides inherited member 'Animal.AdditionalProperties'. Use the new keyword if hiding was intended.

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -147,7 +146,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 149 in samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/httpclient/standard2.0/Petstore/)

'Dog.BaseValidate(ValidationContext)' hides inherited member 'Animal.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// Cat
/// </summary>
[DataContract(Name = "Cat")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Cat : Animal, IEquatable<Cat>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// ChildCat
/// </summary>
[DataContract(Name = "ChildCat")]
[JsonConverter(typeof(JsonSubtypes), "PetType")]
public partial class ChildCat : ParentPet, IEquatable<ChildCat>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// Dog
/// </summary>
[DataContract(Name = "Dog")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Dog : Animal, IEquatable<Dog>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// Cat
/// </summary>
[DataContract(Name = "Cat")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Cat : Animal, IEquatable<Cat>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// ChildCat
/// </summary>
[DataContract(Name = "ChildCat")]
[JsonConverter(typeof(JsonSubtypes), "PetType")]
public partial class ChildCat : ParentPet, IEquatable<ChildCat>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// Dog
/// </summary>
[DataContract(Name = "Dog")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Dog : Animal, IEquatable<Dog>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// Cat
/// </summary>
[DataContract(Name = "Cat")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Cat : Animal, IEquatable<Cat>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// ChildCat
/// </summary>
[DataContract(Name = "ChildCat")]
[JsonConverter(typeof(JsonSubtypes), "PetType")]
public partial class ChildCat : ParentPet, IEquatable<ChildCat>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// Dog
/// </summary>
[DataContract(Name = "Dog")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Dog : Animal, IEquatable<Dog>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// Cat
/// </summary>
[DataContract(Name = "Cat")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Cat : Animal, IEquatable<Cat>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// ChildCat
/// </summary>
[DataContract(Name = "ChildCat")]
[JsonConverter(typeof(JsonSubtypes), "PetType")]
public partial class ChildCat : ParentPet, IEquatable<ChildCat>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Org.OpenAPITools.Model
/// Dog
/// </summary>
[DataContract(Name = "Dog")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Dog : Animal, IEquatable<Dog>, IValidatableObject
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
/// Cat
/// </summary>
[DataContract(Name = "Cat")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Cat : Animal, IEquatable<Cat>, IValidatableObject
{
/// <summary>
Expand Down Expand Up @@ -86,7 +85,7 @@
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }

Check warning on line 88 in samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/)

'Cat.AdditionalProperties' hides inherited member 'Animal.AdditionalProperties'. Use the new keyword if hiding was intended.

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -165,7 +164,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 167 in samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/)

'Cat.BaseValidate(ValidationContext)' hides inherited member 'Animal.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
/// ChildCat
/// </summary>
[DataContract(Name = "ChildCat")]
[JsonConverter(typeof(JsonSubtypes), "PetType")]
public partial class ChildCat : ParentPet, IEquatable<ChildCat>, IValidatableObject
{
/// <summary>
Expand All @@ -53,7 +52,7 @@
/// </summary>

[DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = true)]
public PetTypeEnum PetType

Check warning on line 55 in samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/)

'ChildCat.PetType' hides inherited member 'GrandparentAnimal.PetType'. Use the new keyword if hiding was intended.
{
get{ return _PetType;}
set
Expand All @@ -69,7 +68,7 @@
/// Returns false as PetType should not be serialized given that it's read-only.
/// </summary>
/// <returns>false (boolean)</returns>
public bool ShouldSerializePetType()

Check warning on line 71 in samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/)

'ChildCat.ShouldSerializePetType()' hides inherited member 'GrandparentAnimal.ShouldSerializePetType()'. Use the new keyword if hiding was intended.
{
return _flagPetType;
}
Expand Down Expand Up @@ -125,7 +124,7 @@
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }

Check warning on line 127 in samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/)

'ChildCat.AdditionalProperties' hides inherited member 'ParentPet.AdditionalProperties'. Use the new keyword if hiding was intended.

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -209,7 +208,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 211 in samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/)

'ChildCat.BaseValidate(ValidationContext)' hides inherited member 'ParentPet.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
/// Dog
/// </summary>
[DataContract(Name = "Dog")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Dog : Animal, IEquatable<Dog>, IValidatableObject
{
/// <summary>
Expand Down Expand Up @@ -86,7 +85,7 @@
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }

Check warning on line 88 in samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/)

'Dog.AdditionalProperties' hides inherited member 'Animal.AdditionalProperties'. Use the new keyword if hiding was intended.

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -168,7 +167,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 170 in samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/)

'Dog.BaseValidate(ValidationContext)' hides inherited member 'Animal.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
/// Cat
/// </summary>
[DataContract(Name = "Cat")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Cat : Animal, IEquatable<Cat>, IValidatableObject
{
/// <summary>
Expand Down Expand Up @@ -64,7 +63,7 @@
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }

Check warning on line 66 in samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/Petstore/)

'Cat.AdditionalProperties' hides inherited member 'Animal.AdditionalProperties'. Use the new keyword if hiding was intended.

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -143,7 +142,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 145 in samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/Petstore/)

'Cat.BaseValidate(ValidationContext)' hides inherited member 'Animal.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
/// ChildCat
/// </summary>
[DataContract(Name = "ChildCat")]
[JsonConverter(typeof(JsonSubtypes), "PetType")]
public partial class ChildCat : ParentPet, IEquatable<ChildCat>, IValidatableObject
{
/// <summary>
Expand All @@ -52,7 +51,7 @@
/// Gets or Sets PetType
/// </summary>
[DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = true)]
public PetTypeEnum PetType { get; set; }

Check warning on line 54 in samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/Petstore/)

'ChildCat.PetType' hides inherited member 'GrandparentAnimal.PetType'. Use the new keyword if hiding was intended.
/// <summary>
/// Initializes a new instance of the <see cref="ChildCat" /> class.
/// </summary>
Expand Down Expand Up @@ -83,7 +82,7 @@
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }

Check warning on line 85 in samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/Petstore/)

'ChildCat.AdditionalProperties' hides inherited member 'ParentPet.AdditionalProperties'. Use the new keyword if hiding was intended.

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -167,7 +166,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 169 in samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/Petstore/)

'ChildCat.BaseValidate(ValidationContext)' hides inherited member 'ParentPet.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
/// Dog
/// </summary>
[DataContract(Name = "Dog")]
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
public partial class Dog : Animal, IEquatable<Dog>, IValidatableObject
{
/// <summary>
Expand Down Expand Up @@ -64,7 +63,7 @@
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }

Check warning on line 66 in samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/Petstore/)

'Dog.AdditionalProperties' hides inherited member 'Animal.AdditionalProperties'. Use the new keyword if hiding was intended.

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -146,7 +145,7 @@
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)

Check warning on line 148 in samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs

View workflow job for this annotation

GitHub Actions / Build .Net projects (samples/client/petstore/csharp/restsharp/standard2.0/Petstore/)

'Dog.BaseValidate(ValidationContext)' hides inherited member 'Animal.BaseValidate(ValidationContext)'. Use the new keyword if hiding was intended.
{
foreach (var x in base.BaseValidate(validationContext))
{
Expand Down
Loading