Protocol Buffer Unused Imports for Annotations

290 Views Asked by At

When importing other protocol buffer definitions to use for annotations, such as the ones in grpc-gateway protoc-gen-openapiv2 to add extra information for the generated openapi doc, the generated code imports these annotations even though they aren't used in the code. It is sort of annoying to have to add all these dependencies to our applications even though they annotations aren't being used.

Is there a way to disable certain imports from being included in the generated code?

0

There are 0 best solutions below