Open MarcosCosmos opened 1 month ago
I've also confirmed it can be reproduced when using "outputFormat": "apiPage"
.
It seems there is a problem on following logics. https://github.com/dotnet/docfx/blob/main/src/Docfx.Dotnet/DotnetApiCatalog.ApiPage.cs#L398
When BaseType
is generic class.
It seems SymbolEqualityComparer.Default.Equals
always returns false
.
It need to compare BaseType.OriginalDefinition
instance instead.
Describe the bug Not sure why, but the markdown metadata output format doesn't seem to include a Derived section on pages that happen to be generic, even though they would be listed in the yaml counterpart.
To Reproduce Steps to reproduce the behavior:
public class GenericDerivedClass : GenericBaseClass
{
}
{ "metadata": [ { "src": [ ... ], "dest": ... } ] }
... derivedClasses:
{ "metadata": [ { ... "outputFormat": "markdown" } ] }
...
Derived
GenericDerivedClass<T> ...
Actual behavior
DocFXTest.GenericBaseClass-1.md
, does not have aDerived
section, i.e.:Type Parameters
T
Inheritance
object ← GenericBaseClass<T>
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()