elixir-grpc / grpc-reflection

elixir graph reflection support
Apache License 2.0
9 stars 6 forks source link

[Feature] Support extensions for proto2 #11

Closed zhihuizhang17 closed 8 months ago

zhihuizhang17 commented 8 months ago

Summary

This PR implements extension support for proto2 by:

Unit test

Test cases run with proto2.

helloworld.HelloReply is a message: message HelloReply { optional string message = 1; optional .google.protobuf.Timestamp today = 2; extensions 100 to 199, 500 to 1000; }


+ test `:all_extension_numbers_of_type` and `file_containing_extension`

grpcurl -plaintext -format text -d 'name: "gRPCurl"' localhost:50051 helloworld.Greeter.SayHello

message: "Hello gRPCurl" today: < seconds:1702870608 nanos:991037583

[helloworld.extend_message]: "extended message"

id: 1 name: "name"