pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.59k stars 462 forks source link

Add support for proto3's optional fields added in protoc 3.15 #485

Open gwvandesteeg opened 2 years ago

gwvandesteeg commented 2 years ago

Please add support for the optional attribute on basic data types as per available functionality in protoc 3.15+

enrichment.proto: is a proto3 file that contains optional fields, but code generator protoc-gen-doc hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.--doc_out:

Example:

message Example {
  string display_name = 1;  /// name to display
  optional string given_name = 2;  /// optional first name
  optional string surname = 3; /// optional surname
 }