According to buf doc, by default option java_outer_classname converts the weather.proto filename, for example, to WeatherProto. In my case, it converted it to WeatherOuterClass.
I'm not setting the option java_outer_classname
in my proto file because I thought it would be handled by default by Buf. Am I missing something?
My buf.gen.yaml looks like:
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: v3/golang/gen
opt: paths=source_relative
My buf.yaml looks like:
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
This seems to work as documented for me. I'm starting with this tree:
My buf.gen.yaml:
My acme/weather/v1/weather.proto:
buf generate
generates a classcom.acme.weather.v1.WeatherProto
.Now with managed mode enabled:
And the options in acme/weather/v1/weather.proto commented out:
buf generate
generates the same classcom.acme.weather.v1.WeatherProto
. Managed mode simply sets the options, but does not make any other modifications.