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

add --emit-defaults option #410

Merged
merged 3 commits into from
Apr 22, 2021
Merged

add --emit-defaults option #410

merged 3 commits into from
Apr 22, 2021

Conversation

ktr0731
Copy link
Owner

@ktr0731 ktr0731 commented Apr 22, 2021

Resolves #404.

Evans now supports --emit-defaults option which emits default values.

$ echo '{}' | ./evans -r cli call api.Example.Unary
{}

$ echo '{}' | ./evans -r cli call --emit-defaults api.Example.Unary
{
  "message": ""
}
[email protected]:50051> call Unary
name (TYPE_STRING) =>
{}

[email protected]:50051> call --emit-defaults Unary
name (TYPE_STRING) =>
{
  "message": ""
}

@ktr0731 ktr0731 self-assigned this Apr 22, 2021
@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #410 (e00f4e4) into master (a6327f5) will increase coverage by 0.08%.
The diff coverage is 95.00%.

@@            Coverage Diff             @@
##           master     #410      +/-   ##
==========================================
+ Coverage   80.18%   80.26%   +0.08%     
==========================================
  Files          57       57              
  Lines        2740     2762      +22     
==========================================
+ Hits         2197     2217      +20     
- Misses        311      312       +1     
- Partials      232      233       +1     

@ktr0731 ktr0731 merged commit fb471a3 into master Apr 22, 2021
@ktr0731 ktr0731 deleted the emit-defaults branch April 22, 2021 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support to display the default values.
1 participant