ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
5.27k stars 748 forks source link

Unable to retrieve XML documentation for methods with `Dictionary` arguments #7764

Closed smbecker closed 2 days ago

smbecker commented 3 days ago

Product

Hot Chocolate

Version

14.0.0

Link to minimal reproduction

https://github.com/smbecker/graphql-platform/blob/sb-xml-docs/src/HotChocolate/Core/test/Types.Tests/Types/Descriptors/Conventions/XmlDocumentationProviderTests.cs#L419

Steps to reproduce

Include a method with a Dictionary<string, string> parameter.

public class WithDictionaryArgs
{
    /// <summary>
    /// This is a method description
    /// </summary>
    /// <param name="args">Args description</param>
    /// <returns></returns>
    public string Method(Dictionary<string, string>? args = null) => string.Empty;
}

What is expected?

The documentation should be retrieved from XmlDocumentationProvider for the given method.

What is actually happening?

The XML path for methods with Dictionary arguments are generated incorrectly. The method name with a parameter of Dictionary<string, string> ends up with Dictionary{System.String],[System.String} rather than Dictionary{System.String,System.String}. This causes the XML element to not be found when calling XmlDocumentationProvider.GetDescription for the given method.

Relevant log output

Additional context

No response