Feature: Keep documentation of fluent members and methods
The generated classes and interfaces do not have the documentation of the specified FluentMembers and FluentMethods, would it be possible to copy that into the generated code, such that is can be displayed to the users through hints in their IDE?
Hi @vzam, thank you for this suggestion! I believe it's technically possible. Conceptually, there’s the challenge of handling the documentation for FluentMembers, as their documentation strings could be written from a different perspective. For example:
[FluentApi]
public class Student
{
/// <summary>
/// Gets the first name.
/// </summary>
[FluentMember(0, "Named", 0)]
public string FirstName { get; private set; }
/// <summary>
/// Gest the last name.
/// </summary>
[FluentMember(0, "Named", 1)]
public string LastName { get; private set; }
...
}
For the builder, the documentation could look like this:
/// <summary>
/// Sets the first name and the last name.
/// </summary>
/// <param name="firstName">The first name.</param>
/// <param name="lastName">The last name.</param>
/// <returns></returns>
public static IOfAgeBornOn Named(string firstName, string lastName)
{
...
}.
If you or anyone else can think of other edge cases where the documentation can't simply be copied, please add them to the issue.
Best regards, Kevin
Is this feature being worked on at the moment?
Thanks for the ping! I currently don't have the capacity to work on that feature, but I’m planning to implement it in Q3.