MSGraph-SDK-Code-Generator
MSGraph-SDK-Code-Generator copied to clipboard
DerivedTypeConverter incorrectly applied
https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/blob/dev/Templates/CSharp/Model/ComplexType.cs.tt#L44
if (complex.Derived != null && complex.Base == null)
{
attributeStringBuilder.Append(Environment.NewLine);
attributeStringBuilder.Append(" ");
attributeStringBuilder.Append("[JsonConverter(typeof(DerivedTypeConverter))]");
}
complex.Derived is never null as far as I've observed. It can be an empty list. We should change this check to complex.Derived?.Count > 0
AB#7081