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

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

Closed
smbecker opened this issue Nov 25, 2024 · 0 comments · Fixed by #7765
Closed

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

smbecker opened this issue Nov 25, 2024 · 0 comments · Fixed by #7765

Comments

@smbecker
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants