perezd/protopoet

Allow ProtoFile syntax to be specified by user

Opened this issue · 0 comments

A new builder method like setSyntax should be added, and should accept an enum, perhaps:

ProtoFile.builder().setSyntax(ProtoSyntax.PROTO3)

This syntax enum should be available to the internals of the system so that spec enforcement can be done. Today, only proto2 or proto3 are valid options. The default should be proto3 if not specified given that was the default when this library/API was introduced.