Example of repo to share protobuf between microservices
All protobuf definitions under protobuf folder.
Make sure you apply the defined style guide to your protobuf definitions.
Keep in mind the following rules to prevent introducing breaking changes:
- Never delete/rename a field from an existing message. Just mark it as deprecated;
- Never change the field number;
- Never renaming service endpoints;
- Never renaming message names;
Before you commit make sure you run make proto
to compile the protos.
To add support for a new language, let's say python, we need to add it to:
- Makefile: append
python
to the variableLANGS
;
To generate protobuffers in specific language you can execute
make proto
By default only will generate for golang but you can add another language if you want
In order to release a new version of this repo the recommended flow is that you create a new release in github.