Open kermit10 opened 8 years ago
I agree, want to make a patch?
AFAIK you'll have to reimplement part of what protoc does: do what's in protoc-gen-letmegrpc/main.go and write out gen.Response.File-s.
Its quite a lot of reimplementing work.
maybe this can help here https://github.com/emicklei/proto .
Each of our services also provides an endpoint to serve the proto definition of the api ; would be nice if letmegrpc could take that URL and produce the Web form dynamically. Kind of Swagger UI for gRPC
Yes that would definitely help. I have some questions though.
1) Is the proto parser complete? Can it for example parse https://github.com/gogo/protobuf/blob/master/test/thetest.proto and https://github.com/gogo/protobuf/blob/master/test/theproto3/theproto3.proto
2) I see your proto parser includes protofmt, which means you'll have to return an ast that is more descriptive than the FileDescriptorSet, because of unattached comments, which are not returned in the FileDescriptorSet, as far as I know. Can your proto parser also return a FileDescriptorSet, as this is what most standard tools are built on, or is transforming the proto ast into the FileDescriptorSet still something that needs to be done?
Even if these are still shortcomings, I still think your proto parser is by far the most complete option, currently available.
With support for reflection in Go, it would be great if letmegrpc could supports rendering from a proto file descriptor.