Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can this be used to generate grpc service definitions? #27

Closed
danbopes opened this issue Sep 13, 2017 · 2 comments
Closed

Can this be used to generate grpc service definitions? #27

danbopes opened this issue Sep 13, 2017 · 2 comments

Comments

@danbopes
Copy link
Contributor

In the grpc node examples folder they generate the contracts between the services, but also the service itself _grpc_pb.js. I notice that you can add service=true to generate the grpc-web bindings, but what about the grpc service definitions?

@MarcusLongmuir
Copy link
Contributor

@danbopes: This project (ts-protoc-gen) currently only generates the method definitions in a format that https://github.com/improbable-eng/grpc-web requires.

I think it might make sense to generate the node grpc declarations in a separate plugin - I realise by the same logic the grpc-web definitions should also be generated by a separate plugin, but there hasn't been a pressing need to.

To that end, creating a TypeScript library that can be used to build these various protoc plugins would be a good next step.

This could be done by splitting the parsing and printing steps that this plugin performs and creating an interface that can be used to print other formats.

@jonny-improbable
Copy link
Contributor

See #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants