I have followed the steps at MSDN, and other SO questions, to setup documenting and to have the XML comments show in the descriptions section of the help page. However, I am
API help not show Body Parameters descriptions. In class properties missing description info. Just add DescriptionAttribute to property:
[Description("Simple description")]
public string Text { get; set; }
This is my fix:
public string GetDocumentation(MemberInfo member)
{
string memberName = String.Format(CultureInfo.InvariantCulture, "{0}.{1}", GetTypeName(member.DeclaringType), member.Name);
string expression = member.MemberType == MemberTypes.Field ? FieldExpression : PropertyExpression;
string selectExpression = String.Format(CultureInfo.InvariantCulture, expression, memberName);
XPathNavigator propertyNode = _documentNavigator.SelectSingleNode(selectExpression);
var result = GetTagValue(propertyNode, "summary") ?? GetDescription(member);
return result;
}
private static string GetDescription(MemberInfo memberInf)
{
var result = (memberInf.GetCustomAttribute(typeof(DescriptionAttribute)) as DescriptionAttribute)?.Description;
return result;
}
screenshot