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

Support documentation comments #29

Open
adamconnelly opened this issue Sep 7, 2020 · 0 comments
Open

Support documentation comments #29

adamconnelly opened this issue Sep 7, 2020 · 0 comments

Comments

@adamconnelly
Copy link
Owner

Thrift supports adding javadoc style comments to Thrift IDL files, and including the documentation in the generated code. If we take the following Thrift definition:

/**
 * Describes the different types of user.
 */
enum UserType {
  /**
   * Represents an administrator.
   */
  Administrator
}

It might end up generating the following code:

/// <summary>
/// Describes the different types of user.
/// </summary>
public enum UserType
{
    /// <summary>
    /// Represents an administrator.
    /// </summary>
    Administrator
}

Things to consider:

  • I think the Thrift compiler only supports adding basic summaries to elements, rather than documenting params, exceptions, return types, etc.
  • It only supports javadoc comments. We could also support C# XML comments to make it more familiar to C# developers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant