Dogacel / kotlinx-protobuf-gen

Generate kotlinx serializable data classes from protobuf
Apache License 2.0
12 stars 3 forks source link

Add in-code comments to generated code #6

Open Dogacel opened 1 year ago

Dogacel commented 1 year ago

We should show copy comments in protobuf files to generated code.

Source Code Info can be found inside the file descriptor proto.

Example:

// A test message
message TestMessage {
  // The id
  int32 id = 1;
  string name = 2; // A name
}

should be converted to

/**
 * A test message
 *
 * @param id The id
 * @param name A name
**/
@Serializable
data class TestMessage ( ... )