asyncapi / saunter

Saunter is a code-first AsyncAPI documentation generator for dotnet.

Home Page:https://www.asyncapi.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate message payload description from XML documentation

Gabrielbdd opened this issue · comments

It would be nice if XML documentation (ex: summary tags) generated corresponding "description" attributes on the message payload object.

For example, given this message:

public class UserSignUpMessage
{
  /// <summary>
  /// Email of the user
  /// </summary>
  public string Email { get; set; }
}

The generated message payload would be:

components:
  messages:
    UserSignedUp:
      payload:
        type: object
        properties:
          email:
            type: string
            description: Email of the user

I only tested that using "summary", so I'm not sure if something like that is already possible with other kind of comment and just not documented yet.

Anyways, I think it would be a great addition 😄

Never mind, I just noticed that I was forgetting to generate the XML documentation.

But maybe we can add that information on the README, so people does not forget to add <GenerateDocumentationFile>true</GenerateDocumentationFile>