Skip to content

Generated Dart code lacks comments / api documentation #973

@shadone

Description

@shadone

There seems to an issue with the output missing api docs from the original .proto file, but only if the code generated with "grpc" option.

For example see this protobuf

syntax = "proto3";

package service1;

service TestMethodDocsService {
  // This inline doc comment should be preserved.
  rpc SayHello (HelloRequest) returns (HelloReply) {}
}

message HelloRequest {
  string name = 1;
}

message HelloReply {
  string message = 1;
}

Then compare the generated code with and without the "grpc" option:

With "grpc" option

protoc --dart_out="grpc:generated-with-grpc" --plugin=./bin/protoc-gen-dart ./doc.proto

Without "grpc" option

protoc --dart_out="generated-without-grpc" --plugin=./bin/protoc-gen-dart ./doc.proto

The inline doc for the SayHello method is missing only when "grpc" option is specified

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions