In case someone is interested we finally reached to a solution we are comfortable with: https://github.com/uber/prototool/issues/469#issuecomment-509284046.
[image: Sketch - 6.png] On Thursday, June 13, 2019 at 9:28:25 AM UTC+2, Gorka Lertxundi wrote: > > 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! > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/2b59cee5-a5fa-4c80-bd7e-81ee10524c2a%40googlegroups.com.
