smnbbrv / ngx-grpc

Angular gRPC framework
MIT License
238 stars 34 forks source link

fix(protoc-gen-ng): properly generate ID of nested messages #90

Closed adejewski-msol closed 2 years ago

adejewski-msol commented 2 years ago

Static id for nested messages are generated incorrectly.

Let's assume we have the structure like the one below:

message Foo{
  uint32 value = 1;
  message Bar {
    uint32 value = 1;
  }
}

In this case for Bar the id the protoc-gen-ng generates is: {pb_package}.Bar but it should be {pb_package}.Foo.Bar.

Because of that it is impossible to correctly unmarshal this struct from google.protobuf.Any field. This PR fixes it. Questions, suggestions and remarks are welcomed.

smnbbrv commented 2 years ago

HI @adejewski-msol

thank you for your work!