Hi people
Currently in our company we're trying to resolve a package naming issue. We would like define a pattern for naming the public vs internal packages. If those APIs are completely different there is no problem at all, i.e, GaragesAPI (internal/private) or CarsAPI (public). But what about the same entity that could have public & private fields and/or methods? For example, CarsAPI has the public facing part (list, get, update -only public fields-) and then internally there is a similar API but with much more capabilities like (update -any fields-, custom methods like transfer ownership, etc.).
So, how does people solve this issue? I'm thinking on something like mycompany.cars.v1 (file mycompany/cars/v1/cars.proto) & mycompany.carsinternal.v1 (file mycompany/carsinternal/v1/carsinternal.proto)?
If someone is thinking on the burden of managing two similar but different APIs (public & internal), don't worry as we already solved how to deal with duplication by creating a custom protobuf extension (mycompany.api.internal) over fields and methods and then autogenerate the public facing proto as it's the one with less fields & methods. Also the stub is autogenerated and cars will call carsinternal automatically.
Thanks!