diff --git a/codegen/src/main/scala/Fs2CodeGenerator.scala b/codegen/src/main/scala/Fs2CodeGenerator.scala index 29ffc470..710a4ea9 100644 --- a/codegen/src/main/scala/Fs2CodeGenerator.scala +++ b/codegen/src/main/scala/Fs2CodeGenerator.scala @@ -67,6 +67,7 @@ object Fs2CodeGenerator extends ProtocCodeGenerator { def handleCodeGeneratorRequest(request: PluginProtos.CodeGeneratorRequest): PluginProtos.CodeGeneratorResponse = { val builder = CodeGeneratorResponse.newBuilder + builder.setSupportedFeatures(CodeGeneratorResponse.Feature.FEATURE_PROTO3_OPTIONAL.getNumber.toLong) val genRequest = CodeGenRequest(request) parseParameters(genRequest.parameter) match { case Right((params, fs2params)) => diff --git a/e2e/src/main/protobuf/test_proto3_optional.proto b/e2e/src/main/protobuf/test_proto3_optional.proto new file mode 100644 index 00000000..4dfe7b8f --- /dev/null +++ b/e2e/src/main/protobuf/test_proto3_optional.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package hello.world; + +enum LogLevel { + TRACE = 0; + DEBUG = 1; + INFO = 2; + WARN = 3; + ERROR = 4; + FATAL = 5; + OFF = 6; +} + +message LoggerConfiguration { + string name = 1; + LogLevel effectiveLevel = 2; + optional LogLevel configuredLevel = 3; +} \ No newline at end of file