question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some default gRPC request examples do not have default fields set.

See original GitHub issue

For 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:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ikhooncommented, Jun 22, 2020

Related work: https://github.com/fullstorydev/grpcui#request-form handles one-of nicely. image

0reactions
ikhooncommented, Jun 26, 2020

How about creating a new issue for revamping the debug page? I think the original issue has been resolved via #2828.

Yeap, let me close this issue and create anthoer one for the debug page.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found