Closed MEnnabah closed 2 weeks ago
hey @MEnnabah, a couple things:
To start off with, those validate.rules
options look to be protoc-gen-validate options, which have no impact on the generated code (besides generating Validate
methods for supported languages, which currently does not include Rust).
The generated code is all coming from the prost code generator, wrapped by the protoc-gen-prost protobuf plugin. You may want to read this issue and the linked issues from the second comment, which discuss this representation in prost. The place to change the generated code would be within prost.
Unfortunately there's not much to be done on the buf
side here, as the Cargo Registry is wrapping the underlying plugin / code generator, so I'm going to close this out.
GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)
N/A
Commands
Output
Expected Output
Since
SubjectReference
is defined as follows:I expected the output to:
Anything else?
Notice: in
.proto
file, the filedobject
was marked asrequired
, and the fieldoptional_relation
is not marked as required. I expect the output to use RustOption
to match with the proto schema.