Some default gRPC request examples do not have default fields set.
See original GitHub issueFor example, CreateGreetingRequest is serialized into an empty JSON object when GrpcDocServicePlugin builds its default example request:
message CreateGreetingRequest {
FullName full_name = 1;
}
message FullName {
string first_name = 1;
string last_name = 2;
}
A workaround is to specify an example object explicitly when building a DocService, as documented in https://line.github.io/armeria/server-docservice.html#example-requests-and-headers
/cc @gary-lo
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
default values and testing if a field is set in v3 #359 - GitHub
I want to send/set a zero/default value and know which fields were sent/set when received (i.e. fields that don't get sent/updated every ...
Read more >Language Guide (proto3) | Protocol Buffers - Google Developers
The default value for repeated fields is empty (generally an empty list in the appropriate language). Note that for scalar message fields, once ......
Read more >grpc - Stopping omission of default values in Protocol Buffers
But in my case I want to receive whether the client has explicitly set true/false for fields email_subscribed/sms_subscribed (because the values ...
Read more >Default Values vs Missing Values - Google Groups
I wanted ask regarding the decision to populate fields with default values, even if they do not appear in the encoded message.
Read more >Core concepts, architecture and lifecycle - gRPC
By default, gRPC uses protocol buffers as the Interface ... The client reads from the returned stream until there are no more messages....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Related work: https://github.com/fullstorydev/grpcui#request-form handles one-of nicely.
Yeap, let me close this issue and create anthoer one for the debug page.