salesforce / grpc-java-contrib

Useful extensions for the grpc-java library
BSD 3-Clause "New" or "Revised" License
220 stars 34 forks source link

Add a field/variable at code generation #244

Closed 313hemant313 closed 1 year ago

313hemant313 commented 1 year ago

Using Jprotoc, wanted to check if we can safely add a field at the time of code generation.

Like adding List jsonPojoList, while supporting safe data transfer.

313hemant313 commented 1 year ago

@rmichela Can you please guide.

rmichela commented 1 year ago

JProtoc cannot modify the code generated directly by protoc.

You can, however, author a custom code generator that will run alongside protoc's generator and generate any additional source files or classes you'd like.

313hemant313 commented 1 year ago

@rmichela Any sample code to do the same ? any reference ?