-
Notifications
You must be signed in to change notification settings - Fork 52
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
Handling well-known types #4
Comments
It looks like there is no support for handling protobuf well-known types. I added support for handling the following well-known types and have confirmed it working locally.
Is it ok to create a PR? |
^^ you need to run the protoc-gen-grpc-gateway-ts on |
Ah I see... Is the following fix acceptable as a PR? We don't have to use protoc-gen-gateway-ts on timestamp or any everytime. |
Generate typescript for the depending proto files works out nicely and it is a natural requirement like all other protoc plugins. So I don't think making a special case here make sense. |
Ok I understand. Thank you for your kind response 🙇🏼 |
Hi, if we run the protoc-gen-grpc-gateway-ts on
Which will be rejected by grpc-gateway. I think we still need to set up exception rules for parsing those WKTs, at least for Timestamp and Duration. |
@lixin9311 Since this issue is closed, you can reference this and open a new issue 🙏🏼 |
Given the following proto message:
The following TypeScript is being generated which throws a type error because neither
timestamp.pb.ts
norany.pb
exist.Please let me know if I am missing any steps in the generation process 🙏🏼
I used the following command to generate the above TypeScript file.
protoc -I. --grpc-gateway-ts_out=. --grpc-gateway-ts_opt logtostderr=true --grpc-gateway-ts_opt loglevel=debug ./proto/example.proto
The text was updated successfully, but these errors were encountered: