-
Hello, I am trying to parse a existing proto file in my local. And add some new code for eg:
to be changed as
I need to add this change all the method calls within the proto file. However instead of doing it manually. I would like to introduce code generation. I was wondering if I can use wire-schema in order to read the proto file and make changes to it through of any of the library classes. Please let me know. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
That should be simple yes. |
Beta Was this translation helpful? Give feedback.
That should be simple yes.
You don't even have to build the Schema, you could manipulate the parsed file directly.
Parse it with ProtoParser, you mutate the types you want, you could be iterating all
ProtoFileElement#services
, add the option you need or whatever change you wanna do, and reprint the protos withProtoFileElement.toSchema()
.