Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate parameter "description" in message of proto3 #108

Open
0xHigos opened this issue May 8, 2023 · 1 comment
Open

How to generate parameter "description" in message of proto3 #108

0xHigos opened this issue May 8, 2023 · 1 comment

Comments

@0xHigos
Copy link

0xHigos commented May 8, 2023

The Go struct code generated by protoc 3 is typically in the following format:
struct{ Field1 string protobuf:"bytes,1,opt,name=field1,proto3" json:"field1,omitempty" }

It only includes protobuf and json parameters. I need to generate fields with additional parameters, such as "protobuf:"", "name:"", "json:"", and "description:". How should I write it in protoc 3?

@emicklei
Copy link
Owner

hi, do you want the field tags to appear in the JSON schema ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants